Mysql5.5.15 uses the new cmake compilation method Setup1: Check whether cmake & mdash; cmake-I has been installed cmakewget-chttp: // Configure
Mysql 5.5.15 adopts the new cmake compiling method.
Setup 1: Check whether cmake -- cmake-I is installed.
Install cmake
Http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz wget-c
Tar-zxvf cmake-2.8.3.tar.gz
Cd cmake-2.8.3
./Bootstrap
./Configure
Make & make install
Setup 2:
Install MYSQL 5.5.8
Http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/mysql-5.5.15.tar.gz wget-c
Tar-zxvf mysql-5.5.15.tar.gz
Cd mysql-5.5.15/
Cmake-DCMAKE_INSTALL_PREFIX: PATH =/usr/local/mysql-DDEFAULT_CHARSET = utf8-DWITH_READLINE = 1-DWITH_EMBEDDED_SERVER = 1-DWITH_SSL = system-release = 1-release = 1-LH
Make & make install
After a long wait, the system is finished.
Groupadd mysql
Useradd-g mysql
Cp/usr/local/mysql/support-files/my-medium.cnf/etc/my. cnf
Vim/etc/my. cnf # basedir and datadir must be added. otherwise, problems may occur.
[Mysqld]
Basedir =/usr/local/mysql
Datadir =/usr/local/mysql/data
/Usr/local/mysql/scripts/mysql_install_db-user = mysql
Chown-R mysql/usr/local/mysql/data
Chgrp-R mysql/usr/local/mysql /.
Cp/usr/local/mysql/support-files/mysql. server/etc/init. d/mysql
Chmod 755/etc/init. d/mysql
Chkconfig-level 345 mysql on
Echo "/usr/local/mysql/lib/mysql">/etc/ld. so. conf
Echo "/usr/local/lib">/etc/ld. so. conf
Ldconfig
/Etc/init. d/mysql start
/Usr/local/mysql/bin/mysqladmin-u root password your MYSQL password
/Etc/init. d/mysql restart
/Etc/init. d/mysql stop
OK is finished ~
FAQs:
1./etc/init. d/mysql: line 256: my_print_defaults: command not found
Solution: Check whether datadir and basedir exist in/etc/my. cnf. if not, add the datadir and basedir directory paths.
As follows:
[Mysqld]
Port = 3306
Basedir =/usr/local/mysql
Datadir =/usr/local/mysql/data
This entry was posted in Mysql. Bookmark the permalink.
This article is from the "Liu Shifa" blog