1. Download
: Http://dev.mysql.com/downloads/mysql/5.6.html#downloads
Download version: I choose here 5.6.33, General edition, Linux under 64-bit
You can also directly copy the 64-bit, download by command: wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz
2. Decompression
#解压tar-zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz# Copy the extracted MySQL directory cp-r mysql-5.6.33-linux-glibc2.5-x86_64/usr/ Local/mysql
3. Adding user groups and users
#添加用户组groupadd mysql# Add user MySQL to user group mysqluseradd-g MySQL MySQL
4. Installation
cd/usr/local/mysql/<br>mkdir/data/mysqlchown-r mysql:mysql././scripts/ mysql_install_db--user=mysql--DATADIR=/USR/LOCAL/MYSQL/DATA/MYSQLCP support-files/mysql.server/etc/init.d/ Mysqldchmod 755/ETC/INIT.D/MYSQLDCP support-files/my-default.cnf/etc/my.cnf #修改启动脚本vi/etc/init.d/mysqld # Modified: Basedir=/usr/local/mysql/datadir=/usr/local/mysql/data/mysql #启动服务service mysqld start #测试连接./mysql/bin/mysql- Uroot #加入环境变量, edit/etc/profile, so you can use MySQL command from anywhere export path= $PATH:/usr/local/mysql//bin<BR >source/etc/profile #启动mysqlservice mysqld start# close Mysqlservice mysqld stop# view run status service Mysqld Status
5. Error
5.1 SQLyog 1130 error when connecting, due to no user rights issue for remote connection
Resolution 1: Change the ' MySQL ' database ' user ' table ' host ' entry from ' localhost ' to '% '.
Resolution 2: Direct authorization
GRANT all privileges on * * to ' root ' @ '% ' identified by ' Youpassword ' with GRANT OPTION;
5.2 Some errors during installation
-bash:./scripts/mysql_install_db:/usr/bin/perl:bad Interpreter: No file or directory
FIX: yum-y Install Perl perl-devel
Installing MySQL system Tables..../bin/mysqld:error while loading shared libraries:libaio.so.1:cannot open shared objec T file:no such file or directory
Solution: Yum-y Install Libaio-devel
6. Other
6.1 Configuring Environment variables
VI +/etc/profile
Export Path=....:/usr/local/mysql/bin
MySQL installation under Linux