MySQL compilation needs cmake, my cmake-2.6.4-5.el6.i686, the latest version is 3.1.0, I will first use 2.6.4 to try
? [Email protected] src]#wgethttp//cdn.mysql.com/downloads/mysql-5.6/mysql-5.6.22.tar.gz ? [Email protected] src]#Tar-ZXF mysql-5.6. A.Tar. gz? [[Email protected] src]# CD MySQL-5.6. A ? [[email protected] MySQL-5.6. A]# groupadd MySQL? [[email protected] MySQL-5.6. A]# useradd-g MySQL mysql-s/bin/false ? [[email protected] MySQL-5.6. A]#mkdir-p/usr/local/MySQL? [[email protected] MySQL-5.6. A]#mkdir-p/data/MYSQLDB [[email protected] MySQL-5.6. A]#Chown-R mysql:mysql/data/mysqldb? [[email protected] MySQL-5.6. A]# Cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/data/mysqldb-ddefault_charset=utf8-ddefault_ collation=utf8_general_ci?? ? [[email protected] MySQL-5.6. A]# Make ? [[email protected] MySQL-5.6. A]# Make Install ? [[email protected] MySQL-5.6. A]# Cd/usr/local/mysql
There's nothing wrong with the above, and there's something wrong with MySQL at the beginning of the configuration:
[Email protected] mysql]#/scripts/mysql_install_db--user=mysql--datadir=/data/mysqldb/#生成mysql系统数据库
Error:starting MySQL ... The server quit without updating PID file
Then, I took--datadir=/data/mysqldb/out, in the mysql_install_db can, at that time do not know why, but back to think, certainly is not the issue of authority, can not write to/data/mysqldb inside, create folders, It turns out that I'm not using the root user to execute this script, no words anymore,
Change to root account and then execute
[Email protected] mysql]#/scripts/mysql_install_db--user=mysql--datadir=/data/mysqldb/#生成mysql系统数据库
There is no problem, see if the/data/mysqldb below the MySQL and test database directory
For the next steps, refer to:
CentOS Installation LNMP Environment nginx1.6.2/1.7.9-php5.4.36/5.6.4-mysql5.6.22
CentOS6.6 Installing MySQL Problems