MySQL Installation summary on Linux

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.