mysql版本5.6
[root@centoshh ~]# rpm -qa |grep ncurses-devel[root@centoshh ~]# [root@centoshh ~]# mkdir -p /usr/local/mysql/data[root@centoshh ~]# [root@centoshh ~]# groupadd -g 1001 mysql [root@centoshh ~]# useradd -u 1001 -g mysql mysql [root@centoshh ~]# passwd mysql [root@centoshh ~]# chown -R mysql:mysql mysql/ [root@centoshh ~]# chown –R mysql:mysql mysql [root@centoshh ~]# cp support-files/my-medium.cnf /etc/my.cnf [root@centoshh ~]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DENABLED_LOCAL_INFILE=1 [root@centoshh ~]# make[root@centoshh ~]# make install[root@centoshh ~]# [root@centoshh ~]# mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data[root@centoshh ~]# bin/mysqld_safe --user=mysql & [root@centoshh ~]# /usr/local/mysql/bin/mysqld_safe –defaults-file=/etc/my.cnf &配置service[root@centoshh ~]# cp support-files/mysql.server /etc/init.d/mysql