首先先通过工具将mysql包上传到linux中
创建特殊的账号:叫做mysql(所属组mysql)
[root@com-jun]# useradd -r -s /sbin/nologin mysql
[root@com-jun]# tar -zxf mysql-5.6.44-linux-glibc2.12-x86_64.tar.gz
[root@com-jun]# chown -R mysql.mysql /usr/local/mysql
[root@com-jun]# yum remove mariadb-libs
[root@com-jun /usr/local/mysql]# scripts/mysql_install_db --user=mysql
[root@com-jun /usr/local/mysql]# cp support-files/mysql.server /etc/init.d/mysql
[root@com-jun]# service mysql start
[root@com-jun /usr/local/mysql]# bin/mysqladmin -u root password '123456';
[root@com-jun /usr/local/mysql]# bin/mysql -uroot -p # 再输入你的密码即可连接