Qt连接Mysql数据库驱动

所需积分/C币:50 2015-07-03 09:40:36 2.56MB PDF
66
收藏 收藏
举报

Windows下Qt连接Mysql数据库的方法,解决QSqlDatabase: QMYSQL driver not loaded 问题
11 建议个修改.鸢仪 将C盘改为D盘 凵A 上一〕 消 4.将全部功能都选上吧,反正也占不了多大空间。 选即可 「 Do fcult 上[步列取 5.直接选择同意协议,点击下一步 a Qt 5.. Setup nnTtslmAr In iF AcA A TAp Ants iAtarE rn1-1mm11ng wi th tFp in=t al lst1nn 其FRA∵,PTRT, 我也不懂这是什么 默认吧 O m u 1. 1 installer is governed t≌r∩5 and condi t1 〖上与则下步mN耿消 6.开始菜单名称,不管,直接下一步 史 E如1 7.点击 Install,开始安装 n otc 8.安装过程有点儿漫长,大概十几分钟左右,耐心等待吧 Inst alline qt 5. 1.1 [:□取 9.安装过程中一般不会出什么问题,当出现下一界面时候程序就基本安装好了 ?× Creating Un孟at山l工金 0 回100 北1.1.1b Instalation fi: shec! 上一步 取消 10.点击下一步,将两个复选框去掉,点击完成 t5.1.15etu Code less Create more Deploy everywhere 完成C 11.线面就是最关键的一步了,就是设置¢的环境变量了,将下面两个路径添加至环 境变量 C: \Qt\Qt5 1.15.1.1\mingw48_32\ bin C∴Qt\Qt5.1.1\ ToolsⅦ mingw4832bin 12.打开cmd,输入 gmake,出现下面的界面宣告安装成功 eC:\IWD0暂5飞syse32Cd.exB t Ionc all place any varialle assiylmenL in upl iuns amu il will le prOcessed as if it was in [files ]. These assignments will he parsed* be fore [files Write out put to fil Increase debu『eue1 Overrides TEHPLA TE as templ tp prefix Overrides TEPLATE so that prefix is prefixed into thB value This hel Version informatian -after All varia ignments after this will be LdfL上[⊥Ls] -norccureiyc Don t do a recursive 3carch De set<pp><vLue〉s -unset <prop> Unset persistent property uu<uPu> Query jer主LLuw吧叫y。Suw乱11ify吧uu>⊥3eyy Don 't usc a cache file Imakefile node only] -node pend Don't generate dependencies [makefile lyI Don’ t generate moc targets【 makefile no nope Don't look for files in pud [projcct modc only] G: \Documents and Settings \Adninistrator> o第—步 MySql开发环境的搭建 1.下载MySq数据库安装程序,下载地址是:htp://pan.baidu.com/s/1gdu9a3T 也可以自己网上下载,但是不要选择56版本,因为在安装过程中需要更改路径,5.6版本 的数据库不支持自定义安装路径。双击 setup. exe出现如下界面,直接点击下一步 ISQL Server 5.0- Setup izard n the Setun Wizard for Mysn Server . O The sebup Wizard will instal My SQL Server 5.J release 5.0. 9E n yeur computer, Tc contiLe, click Next. c)2000. 2012, Or3c 8 ancor its afFiliates. All rights MUSQ Cancel 2.点击同意协议,直接下一步 cense Agre Hease read the follo ense ag erent careful GAU GENERAL PUBLIC LICEVSE py ight 1080, 10- rcc Sof n' tc Foundation, In E1 Frdr k lirI STreeL, FifLhI Flu_r, BUslur, MA 02110-1301 US cf - hs license document, but hanging it is not llowec? ies hitted to copy ard distribu freedom to share and change it By contrast -h3 gNU General public 3.这里我们选择第三项自定义,是为了对数据库的各个安装界面熟悉一下。 H ISQL Serve tup izard ose the setu type tnat best suits our needs rcasc select a sct』tpc e TypIcal Conmon program Features will be instaled Recommerded For Complete VHich s沙 ou want installed and where t ill bc installcd dcd fo. BEck Next 4.将那个叉号单击,选择第二项,即全部安装 1y SQL 5e J,0-5t Select the progran featur es you watt installed 司-|5L5s FEatur= Descriptor remnAnts lISed F 一Thig£ esturay11be:n生11edqn1 ocal har d H This feature, and all sibfeatures, will be installed oa local hari dr Install td Eag This festure, and all sabfeatures, will be installed t> run fron the 1 This festure rill be -stalled whea required X This festiIrP vill not ha avail ah p held <Back L Mext> Cacel- 5.更改安装路径,这个步骤很重要,必须改成没有空格的路径,建议跟我一样,将路 径设置为 C: \MySq,然后点击下一步 TML Serwer 5.0 Setup izard Ll ll e pr u f dll edlur es yu wall i slde_ di aI iLUI 1 iI LlIe lis. Leluw. u Llldiye lIuLv d Iedlu'e is i isler -↓ Clent programme selected. The charge, Help Back Ne: e 6.点击 Install,开始安装 H ISqL Server 5.0- Setup izard he wizard is re≡dtob If you wan: to review or change any installation set ings, click Back, dick Cancel to C: LMy SCLI 7.正在安装过程中,安装挺快的,一会儿的事儿 ly SQl The program feat res you selected are benc installed Please Nait while th= seti n wizard installs MlysC Serve.. This may take 8.当出现这个界面时标志着程序安装成功,开始配置MySq数据库,直接点击下一步 y SQL Enter A MySQL Enterprise subscription is the most MySQL business achieves the highest level of relab ity pity, and upti Enterprise An Enterprise Subscription incudes 1. The MysQL Enterprise Server The mast reliable, secure, and up to date verslon of the world 's most popular open source database. 2. MySQL Enterprise MonItor Servlce-An automated virtual database a:sTart 3. My SQL Production Support- Technlcal and consultative support when you need it, along with service packs, hot-fixes, and more FormpreintormationclickmoRelorvisitwww.mysqlcom/entel 9.一直选择Next,知道出现下一界面,点击 Finish I sQL sar 5。0-5at MYSOL Ser MySQL inish 10.开始配置 MySql数据库,点击Next Iy SQL HLYeI Irs Lance Cunliguraliurl 1 welcome to the mysQL Server Instance Configuration Wizard 1.0.17.0 he ConlgLratbr Wzad w‖la‖ bo conqure the Mly=QL EePer 5.0 server instance, To Continue, cic MUSQL Hext> Cancel 11.选择配置方式," Detailed Configuration(手动精确配置)”、“ Standard Configuration(标准配置)”,我们选择" Detailed Configuration",方便熟悉配置过 程 TrOL Server Instance Configuration izard My50L Server Instance Configuration o petaled Confie rhy Choose ths conflyura: on type t] create the optima sarreget-pfor this machine se thls only on na-h nes hat do no: already have a vy s(L server installation. his will use a gener sl surpose config ration for the server tnat can be tuned manual 12.选择服务器类型, Developer Machine(开发测试类,mysq占用很少资源)"、 Server machine(服务器类型,mysq占用较多资源)"、° edicated My SQL Server Machine(专门的数据库服务器,mysq占用所有可用瓷源)”,大家根据自己的类型选 择了,一般选" Server machine",不会太少,也不会占满。 ySqL Server Instance Configuration izaRd My SQL Server Instance Configuration Please select a server tyEe. Ths will nfluence me mory, disk and CPU uSage. C Developer Machine run on it. Msl, ert mac ine, and many otner applications will br This is a developm rver shoud omly use a m nimal amount of Several server applications wil be punring on this machine, Choo this optio for webjapplication servers My sQL Wil hawE medi t Dedicated my sQL server Machine such as a wuab or mail server, will be run. My SQL will utilize up to all available memory. d 13.选择mysq数据库的大致用途," Multifunctional database(通用多功能型 好)”、“ Transactional Database Only(服务器类型,专注于事务处理,一般) Non- Transactional Database Only(非事务处理型,较简单,主要做一些监控、记数用, 对 MyIsAM数据类型的支持仅限于non- transactional),随自己的用途而选择了,我 这里选择" Transactional Database Only”按“Next”继续。 I了 SOL sarver Ln2t at101 zaEd fiqure the MySOL 5. C server instance Optimized For appl cation servers anc transactional web applications. This uill make InnrnR h e main enrage engina. Nnte thahIP stil be u Cuited Fo sim e web epplicatiors, manitoring ar log=ing applicators well as analys the non sect onal My ISAM E 14.对 InnoDB Tablespace进行配置,就是为 Inno DB数据库文件选择一个存储空 间,如果修改了,要记住位置,重装的时候要选择一样的地方,否则可能会造成数据库损坏, 当然,对数据库做个备份就没问题了,这里不详述。我这里没有修改,使用用默认位置,直 接按“Next”继续

...展开详情
试读 20P Qt连接Mysql数据库驱动
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
  • GitHub

    绑定GitHub第三方账户获取
关注 私信 TA的资源
上传资源赚积分or赚钱
    最新推荐
    Qt连接Mysql数据库驱动 50积分/C币 立即下载
    1/20
    Qt连接Mysql数据库驱动第1页
    Qt连接Mysql数据库驱动第2页
    Qt连接Mysql数据库驱动第3页
    Qt连接Mysql数据库驱动第4页

    试读结束, 可继续读2页

    50积分/C币 立即下载 >