亚洲综合社区欧美综合色-欧美逼逼一区二区三区-国产老熟女高潮精品网站-国产日韩最新视频在线看

始創(chuàng)于2000年 股票代碼:831685
咨詢熱線:0371-60135900 注冊有禮 登錄
  • 掛牌上市企業(yè)
  • 60秒人工響應(yīng)
  • 99.99%連通率
  • 7*24h人工
  • 故障100倍補償
全部產(chǎn)品
您的位置: 網(wǎng)站首頁 > 幫助中心>文章內(nèi)容

CentOS下安裝啟動MySQL及調(diào)用QT

發(fā)布時間:  2012/9/12 17:18:24

一、安裝,啟動mySQL:

1、CentOS中如果已經(jīng)有了mySQL

      /etc/rc.d/init.d/./mysqld start   (啟動mySQL, 此時可以運行mySQL -root)

      編輯rc.local文件  #vi /etc/rc.d/rc.local -
 


      加入如下啟動命令

      /etc/rc.d/init.d/mysqld start

      (mySQL 開機自動啟動)

2、如果沒有安裝:

   1>、yum install mysql,

      安裝后  需要重復(fù) 1 的步驟  設(shè)置開機自動重啟;

   2>、 p { margin-bottom: 0.08in; }

     For CentOS 32-bit system: Get rpm

wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/MySQL-server-community-5.0.92-1.rhel5.i386.rpm

wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/MySQL-client-community-5.0.92-1.rhel5.i386.rpm

wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/MySQL-devel-community-5.0.92-1.rhel5.i386.rpm

wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/MySQL-shared-community-5.0.92-1.rhel5.i386.rpm

wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/MySQL-shared-compat-5.0.92-1.rhel5.i386.rpm

p { margin-bottom: 0.08in; }

wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/MySQL-server-community-5.0.92-1.rhel5.x86_64.rpm

    For CentOS 64-bit system: Get rpm

p { margin-bottom: 0.08in; }

wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/MySQL-server-community-5.0.92-1.rhel5.x86_64.rpm


wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/MySQL-client-community-5.0.92-1.rhel5.x86_64.rpm

wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/MySQL-devel-community-5.0.92-1.rhel5.x86_64.rpm

wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/MySQL-shared-community-5.0.92-1.rhel5.x86_64.rpm

wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/MySQL-shared-compat-5.0.92-1.rhel5.x86_64.rpm


Install

rpm -iUvh MySQL-server-community-5.0.92-1.rhel5.i386.rpm

rpm -iUvh MySQL-client-community-5.0.92-1.rhel5.i386.rpm

rpm -iUvh MySQL-devel-community-5.0.92-1.rhel5.i386.rpm

rpm -iUvh MySQL-shared-community-5.0.92-1.rhel5.i386.rpm

rpm -iUvh MySQL-shared-compat-5.0.92-1.rhel5.i386.rpm

rpm包安裝會設(shè)置開機自動重啟,不需要重復(fù)1的步驟。

二、編譯安裝mysql 使Qt能調(diào)用。   p { margin-bottom: 0.08in; }

export PATH=/opt/qtsdk-2010.04/qt/bin:$PATH

cd /opt/qtsdk-2010.04/qt/src/plugins/sqldrivers/mysql/

for 32-bit:

qmake -o Makefile 'INCLUDEPATH+=/usr/include/mysql' 'LIBS+=-L/usr/lib/mysql' mysql.pro

for 64-bit

qmake -o Makefile 'INCLUDEPATH+=/usr/include/mysql' 'LIBS+=-L/usr/lib64 /mysql' mysql.pro

make

cp libqsqlmysql.so ../../../../plugins/sqldrivers/

如果在qmake時候提示:qpluginbase.pri:10: Unknown replace function: qtLibraryTarget

則是因為export PATH=/opt/qtsdk-2010.04/qt/bin:$PATH  參數(shù)(path)錯誤

如果在make時候提示:../../../sql/drivers/mysql/qsql_mysql.h:52:19: error: mysql.h: No such file or directory

缺少mysql-devel

yum install mysql-devel

重新make


 


本文出自:億恩科技【1tcdy.com】

服務(wù)器租用/服務(wù)器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]

  • 您可能在找
  • 億恩北京公司:
  • 經(jīng)營性ICP/ISP證:京B2-20150015
  • 億恩鄭州公司:
  • 經(jīng)營性ICP/ISP/IDC證:豫B1.B2-20060070
  • 億恩南昌公司:
  • 經(jīng)營性ICP/ISP證:贛B2-20080012
  • 服務(wù)器/云主機 24小時售后服務(wù)電話:0371-60135900
  • 虛擬主機/智能建站 24小時售后服務(wù)電話:0371-60135900
  • 專注服務(wù)器托管17年
    掃掃關(guān)注-微信公眾號
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權(quán)所有  地址:鄭州市高新區(qū)翠竹街1號總部企業(yè)基地億恩大廈  法律顧問:河南亞太人律師事務(wù)所郝建鋒、杜慧月律師   京公網(wǎng)安備41019702002023號
      1
     
     
     
     

    0371-60135900
    7*24小時客服服務(wù)熱線