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
| 1234 |
#解压tar-zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz#复制解压后的mysql目录cp-r mysql-5.6.33-linux-glibc2.5-x86_64 /usr/local/mysql |
3. Adding user groups and users
| 1234 |
#添加用户组groupadd mysql#添加用户mysql 到用户组mysqluseradd-g mysql mysql |
4. Installation
| 123456789101112131415161718192021222324252627282930 |
cd/usr/local/mysql/<br>mkdir./data/mysqlchown -R mysql:mysql ././scripts/mysql_install_db--user=mysql --datadir=/usr/local/mysql/data/mysqlcpsupport-files/mysql.server /etc/init.d/mysqldchmod755 /etc/init.d/mysqldcpsupport-files/my-default.cnf /etc/my.cnf#修改启动脚本vi/etc/init.d/mysqld#修改项:basedir=/usr/local/mysql/datadir=/usr/local/mysql/data/mysql#启动服务service mysqld start#测试连接./mysql/bin/mysql-uroot#加入环境变量,编辑 /etc/profile,这样可以在任何地方用mysql命令了exportPATH=$PATH:/usr/local/mysql//bin<br>source/etc/profile #启动mysqlservice mysqld start#关闭mysqlservice mysqld stop#查看运行状态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