1, First download: http://cdn1.mydown.yesky.com/soft/201403/mysql-5.6.4-m7.tar.gz
2, unzip, enter the directory, execute cmake./(if there is no cmake, install sudo yum install cmake), error may occur:
" Cmake_cxx_compiler-notfound " is not found.
Then install: sudo yum install gcc-c++-y
If there are errors:
CMake Error at Cmake/readline.cmake: (MESSAGE): Curses library is not found. Please install appropriate package,remove CMakeCache.txt and rerun CMake. On Debian was is ncurses-devel.
Installation: Yum Install ncurses-devel-y
3. Make & sudo make install
4. Configure MySQL
4.1 Entering the script directory
4.2 sudo chmod +x mysql_install_db
4.3 sudo./mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data/--user=mysql
To start mysqld at boot time with to Copysupport-files/mysql.server to the right place foryour systemplease REMEMBER to SET A PASSWORD for the MySQL root USER! to DoSo, start the server and then issue the following commands:/usr/local/mysql/bin/mysqladmin-u Root Password'New-password'/usr/local/mysql/bin/mysqladmin-u root-h l-data2.tkt.cn6 Password'New-password'Alternatively you can run:/usr/local/mysql/bin/Mysql_secure_installationwhich would also give you the option of removing the testdatabases and anonymous user created bydefault. This isstrongly recommended forproduction servers. See the manual forMore instructions. You can start the MySQL daemon with:cd/usr/local/mysql; /usr/local/mysql/bin/mysqld_safe &can test the MySQL daemon with MySQL-test-RUN.PLCD/usr/local/mysql/mysql-test; Perl mysql-test-run.plplease Report any problems with the/usr/local/mysql/scripts/mysqlbug script!
Take a closer look at the tips above.
4.4 Adding a configuration file
[Email protected]/tmp/mysql-5.6. 4-m7/scripts]$ cd/usr/local/mysql/support-files/[[email protected]-data2.tkt.cn6/usr/local/ mysql/support-files]$ sudo cp my-medium.cnf/etc/my.cnf[[email protected]-data2.tkt.cn6/usr/local/mysql/ support-files]$ sudo cp mysql.server/etc/init.d/mysqld
5. Start the service:
[[email protected]/usr/local/mysql/support-files]$ sudo service mysqld startstarting MySQL. [ OK ]
6. Enter MySQL
Reference:
Http://blog.sina.com.cn/s/blog_7bd720d4010181xg.html
Http://www.jb51.net/article/42548.htm