centos下源碼安裝mysql-5.1.53
0. 設(shè)置PATH[root@ldap-mysql-svn-trac ~]# export PATH="$PATH:/usr/man/mysql/bin"1. 解壓mysql的源碼包mysql-5.1.53.tar.gz,切換到安裝目錄下[root@ldap-mysql-svn-trac mysql-5.1.53]# ./configure --prefix=/usr/man/mysql --sysconfdir=/usr/man/mysql --localstatedir=/usr/man/mysql/data --with-unix-socket-path=/usr/man/mysql/tmp/mysql.sock --with-charset=gbk --with-plugins=innobase --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static#sysconfdir表示mysql的配置文件路徑,localstatedir表示數(shù)據(jù)文件路徑,socket配置和最后2個屬性主要用來提升性能#如果要使用innodb引擎,記得加上--with-plugins=innobase2. install [root@ldap-mysql-svn-trac mysql-5.1.53]# make [root@ldap-mysql-svn-trac mysql-5.1.53]# make install3. config[root@ldap-mysql-svn-trac mysql-5.1.53]# cp /usr/man/mysql/share/mysql/my-medium.cnf /usr/man/mysql/my.cnf4. 切換到mysql的bin目錄下,run[root@ldap-mysql-svn-trac bin]#./mysql_install_db --basedir=/usr/man/mysql --datadir=/usr/man/mysql/data5. 復(fù)制/usr/man/mysql/libexec/mysqld到mysql的bin目錄下,啟動mysql服務(wù)[root@ldap-mysql-svn-trac bin]# cp /usr/man/mysql/libexec/mysqld /usr/man/mysql/bin6. run mysql service/usr/man/mysql/bin/mysqld_safe --ledir=/usr/man/mysql/bin --log-error=/usr/man/mysql/data/t.err --datadir=/usr/man/mysql/data --socket=/usr/man/mysql/tmp/mysql.sock --pid-file=/usr/man/mysql/bin/mysqld.pid &
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com