1. Install and start mySQL: 1. If mySQLetcrc. dinit. d. mysqldstart already exists in CentOS (start mySQL, you can run mySQL-r
1. Install and start mySQL: 1. If mySQL/etc/rc already exists in CentOS. d/init. d /. /mysqld start (to start mySQL, you can run mySQL-r
1. Install and start mySQL:
1. If mySQL already exists in CentOS
/Etc/rc. d/init. d/./mysqld start (start mySQL and run mySQL-root)
Edit the rc. local file # vi/etc/rc. d/rc. local
Add the following startup command
/Etc/rc. d/init. d/mysqld start
(MySQL automatically starts upon startup)
2. If no installation is available:
1>, yum install mysql ,,
After installation, repeat steps 1 to set Automatic Restart upon startup;
2>, p {margin-bottom: 0.08in ;}
For CentOS 32-bit system: Get rpm
Wget
Wget
Wget
Wget
Wget
P {margin-bottom: 0.08in ;}
Wget
For CentOS 64-bit system: Get rpm
P {margin-bottom: 0.08in ;}
Wget
Wget
Wget
Wget
Wget
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
When the rpm package is installed, it is set to automatically restart upon startup. You do not need to repeat Step 1.
2. Compile and install mysql so that Qt can be called. 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 'your depath + =/usr/include/mysql' 'LIBS + =-L/usr/lib/mysql' mysql. pro
For 64-bit
Qmake-o Makefile 'your depath + =/usr/include/mysql' LIBS + =-L/usr/lib64/mysql' mysql. pro
Make
Cp libqsqlmysql. so.../../plugins/sqldrivers/
If the message "qpluginbase. pri: 10: Unknown replace function: qtLibraryTarget" is displayed during qmake
Because the export PATH =/opt/qtsdk-2010.04/qt/bin: $ PATH parameter (path) Error
If the prompt "../.../../SQL/drivers/mysql/qsql_mysql.h: 52: 19: error: mysql. h: No such file or directory" appears during make
Mysql-devel missing
Yum install mysql-devel
Make again