MySQL installation steps

Source: Internet
Author: User

Mid-year Office relocation, new server, test environment needs to be re-built, the following is the installation of the MySQL service process, recording some of the problems, now organized as follows:

1. First download the MySQL installation package, with wget Http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar

2. Download after decompression, decompression after the following so many files (in fact, download RPM package will have a lot of problems, recommended direct Yum installation): 3. Follow http://www.cnblogs.com/lonelywolfmoutain/p/5430515. HTML-given installation steps are installed sequentially: RPM-IVH MYSQL-COMMUNITY-COMMON-5.7.12-1.EL6.X86_64.RPMRPM-IVH MYSQL-COMMUNITY-LIBS-5.7.12-1.EL6.X86_64.RPMRPM-IVH MYSQL-COMMUNITY-CLIENT-5.7.12-1.EL6.X86_64.RPMRPM-IVH mysql-community-server-5.7.12-1.el6.x86_64.rpm but follow this step installation will error, some rely on the library has been unable to find the replacement installation sequence is not, still error. A few packages at the same time, not in order to install, still no, error: 4. It is understood that the installation is not smart enough to use RPM, can not automatically find dependence, so with yum localinstall -c -y -- disablerepo=*  *.rpm command, Installation complete 5. Some points to note after completion: This way to install the MySQL, because it is compiled, the individual files are separate, so you can not choose the installation directory, if necessary to view his configuration file, the default profile in:/etc/ MY.CNF can also view the service startup file, which is the systemd configuration of MySQL: Cat/run/systemd/generator.late/mysqld.service This file is the Service start command systemctl start The standard directory of Mysqld.service executed files Mysqld.service (yum online installation) is in:/usr/lib/systemd/system/mysqld.service, which may be due to the downloaded RPM package, Some are different, if you do not know in which directory, you can do: Systemctl cat Mysqld.service, the first line shows the directory where the files are located: systemctl start mysqld.service - > Start systemctl stop mysqld.service ->  StopStop systemctl status mysqld.service -> View status systemctl enable mysqld.service -> Boot auto-start 6. Above is completed the installation, and then connect to MySQL, with: mysql-u Root, found that the connection is not, error no password, with mysql-u root-p still error: This is because the correct password is not entered. After the MySQL5.7.6 version, the installation will generate a user password when the MySQL process starts, the first login requires this password. The password is stored in the log of the MySQL process,/var/log/mysqld.logcat/var/log/mysqld.log | grep ' password ' 7. Then log on successfully with the default password Mysql-u root-pw&edxegbt9ab8. After success, the operational database will require a password change and then enter: ALTER USER ' root ' @ ' localhost ' Identified by ' Kuangfofeng '; Change password, still error: This is because the password has the strength of the points, explained below, the document is from http://www.cnblogs.com/ivictor/p/5142809. HTML so need to change the password strength, with set global validate_password_policy=0; Check the length of the password associated with: show VARIABLES like ' validate_password% '; 9. After modifying the completion password To see if you can connect with a new password

10. Modify the permissions so that other machines can also access:mysql> GRANT all on *. * to ' root ' @ '% ' identified by ' MySQL ';mysql> flush privileges;11. Install on local virtual machine MySQL, to allow other users to log on to the connection, the virtual machine needs to be changed to bridging mode:

And shut down the firewall:

cenOS7.3 Firewall Status: Firewall-cmd--state shut down firewall: Systemctl stop firewalld.service turn on firewall: Systemctl start Firewalld.service

MySQL installation steps

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.