1. Download, select the version, I downloaded the Linux generic 64-bit.
See if the system is 32-bit or 64-bit
Download to the directory you want to install, mine is/usr/local/
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz
2. Unzip
$ TAR-ZXVF mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz
The list is too long, change a name.
$ mv mysql-5.6.35-linux-glibc2.5-x86_64 MySQL
3. Add user groups and users
$ groupadd MySQL
$ useradd-g MySQL MySQL
4. Install, initialize the table
$ cd/usr/local/mysql
$ mkdir Data
$ chown-r mysql:mysql././scripts/mysql_install_db--user=mysql--datadir=/usr/local/mysql/data
There may be errors here and you need to add dependencies
$ yum-y Install Libaio-devel
$ yum-y Install Perl perl-devel
$ yum install-y Perl-module-install.noarch
Re-execute the chown.
5. The MySQL boot file cp to etc/init.d/, empowering
$ CP Support-files/mysql.server/etc/init.d/mysqld
$ chmod 755/etcinit.d/mysqld
6. Modify the configuration file location for easy management
$ CP support-files/my-default.cnf/etc/my.cnf
7. Modify the startup script
$ vi/etc/init.d/mysqld
$ basedir=/usr/local/mysql/
$ datadir=/usr/local/mysql/data
8. Start MySQL
$ service mysqld start9. Login client. In order to be able to use MySQL command at any time, first establish a soft connection $ cd/usr/local/bin$ ln-fs/usr/local/mysql/bin/mysql mysql$ MySQL -uroot-p
After the modification of the root password, open port, open remote connection permissions and other operations on the internet there are many do not write more.
Linux installation MySQL