1, download http://dev.mysql.com/downloads/mysql/with boost Generic Linux version on official website
2, install dependent Library, yum install cmake git gcc gcc-c++ ncurses ncurses-devel-y
3, use CMake in the source file. -dcmake_install_prefix=/usr/local/mysql-dsysconfdir=/etc-ddefault_charset=utf8-ddefault_collation=utf8_general _ci-dmysql_datadir=/usr/local/mysql/data-dwith_boost=boost detection, generate makefile file, this step is very important, because I have eaten on this, permissions issues, if it is a normal user, Create a good folder in advance
/usr/local/mysql/, ordinary users must change the permissions, Chown xxoo:xxoo/usr/local/mysql/, and then execute the command just now.
4,make && make install (note not sudo make install);
5, if there is no error, open the/usr/local/mysql/support-files/folder, sudo cp my-default.cnf/etc/my.cnf open my.cnf Modify the parameters, put the previous comment out to join
[Client]
Port = 1278
Socket =/usr/local/mysql/data/mysql.sock
[Mysqld]
Port = 1278
Socket =/usr/local/mysql/data/mysql.sock
Basedir =/usr/local/mysql
DataDir =/usr/local/mysql/data
Then remember to modify the permissions, Chown xxoo:xxoo/etc/my.cnf
6, in the/usr/local/mysql/bin directory, use the./mysqld--initialize--user=xxoo--basedir=/usr/local/mysql--datadir=/usr/local/ Mysql/data
Will generate a password, be sure to remember!
7. Open the Mysqd_safe in the bin directory to open another shell window, execute mysql-u root-p Enter
Enter the original password and change the password: ALTER user user () identified by ' xxxxxx '; It's OK!
8. Open the Mysqld_server file in the Support-files file CP to/ETC/INIT.D/MYSQLD using Chkconfig mysqld on.
9, use service mysqld start to open the MySQL process;
Manually compile and install MySQL