Recently through the binary file installed MySQL to do some summary.
1. Download the binary package
wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.32-linux-glibc2.5-i686.tar.gz
2. Unpacking the Package
Tar zxvf mysql-5.6.32-linux-glibc2.5-i686.tar.gz
3. Move the package to/usr/loacl/mysql
MV Mysql-5.6.32-linux-glibc2.5-i686/usr/local/mysql
4. Create a MySQL user
Useradd-s/sbin/nologin MySQL
5. Enter the/usr/mysql directory
cd/usr/local/mysql/
6. Create MySQL Data Catalog
Mkdir-p/data/mysql
7. Add the owning Master
Chown-r Mysql:mysql/data/mysql
8. Initializing the database
./scripts/mysql_install_db--user=mysql--datadir=/data/mysql
See two OK instructions initialization complete
9. Copy boot profile to/etc/init.d/mysqld and config file to/etc/mysql
CP Support-files/mysql.server/etc/init.d/mysqld
CP SUPPORT-FILES/MY-LARGE.CNF/ETC/MY.CNF
10. Give execution permission
chmod 755/etc/init.d/mysqld
11. Add or change the following configuration in/ETC/MYSQL.CNF
[Client]
Port = 3306
Socket =/tmp/mysql.sock
[Mysqld]
Basedir =/usr/local/mysql
DataDir =/data/mysql
Port = 3306
server_id = 1
Socket =/tmp/mysql.sock
Pid-file=/data/mysql/mysql.pid
12. Add MySQL to startup item
Chkconfig--add mysqld
Chkconfig mysqld on
Start MySQL
Service mysqld Start
Check if MySQL is started
Ps-aux|grep MySQL
This article is from the "My Linux Learning Journey" blog, so be sure to keep this source http://dousi.blog.51cto.com/9827926/1855923
binary files loaded with MySQL