This installation is mysql-5.7.10-linux-glibc2.5-x86_64.tar.gz version
shell> Groupadd MySQL
Shell> useradd-r-G MySQL MySQL
Shell> cd/usr/local
Shell> Tar zxvf/path/mysql-5.7.10-linux-glibc2.5-x86_64.tar.gz
shell> MV mysql-5.7.10-linux-glibc2.5-x86_64 MySQL
shell> CD MySQL
shell> mkdir Mysql-files
Shell> chown-r MySQL.
Shell> chgrp-r MySQL.
shell> bin/mysqld--initialize--user=mysql # mysql 5.7.6 and up
shell> bin/mysql_ssl_rsa_setup # mysql 5.7.6 and up
Shell> chown-r Root.
shell> chown-r MySQL Data mysql-files
shell> CP Support-files/mysql.server/etc/init.d/mysql
shell> CP support-files/my-default.cnf/etc/my.cnf
After completing the above steps, we need to modify the my.cnf file we just copied:
Then configure the environment variables for MySQL:
Shell> Vim/etc/profile or it is an environment variable configuration file for ordinary users, such as ~/.BASHRC
Export Path=/usr/local/mysql/bin: $PATH
Then start MySQL
Shell>/etc/init.d/mysql Start
Then go to the MySQL command screen and change the password
Shell> Mysql-u Root-p
Shell> Enter password
mysql> SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpass ');
Then you can use it!
--------------------------------------------------------------------------------------------------------------- ----
This article is only fur, the future will continue to modify the perfect, if there is a bad place to write, please the Great god door advice!
MySQL Installation summary on Linux