CentOS7 mounting mysql5.6.23 (glibc)

Source: Internet
Author: User

One. Download glibc version of MySQL

Mysql-advanced-5.6.23-linux-glibc2.5-x86_64.zip

After decompression, get mysql-advanced-5.6.23-linux-glibc2.5-x86_64.tar.gz

Two. Create a MySQL user

AddUser mysqlpasswd MySQL

Two. Install MySQL

Note that the glibc version of MySQL, not the compiled version, is compiled directly, equivalent to the green version of Windows

The CentOS default Yum source is no longer mysql-server. Instead of using MARIADB instead, 2 database conflicts, so to install MySQL, first uninstall mariadb

Upload the mysql-advanced-5.6.23-linux-glibc2.5-x86_64.tar.gz to the server

Tar zxvf mysql-advanced-5.6.23-linux-glibc2.5-x86_64.tar.gzmv mysql-advanced-5.6.23-linux-glibc2.5-x86_ mysql5.6.23cd mysql5. 6.23# initializing MySQL database scripts/mysql_install_db--user=mysql

Three. Turn on MySQL

Bin/mysqld_safe--user=mysql

Four. Perform security settings

#bin/mysql_secure_installation

Note:running all PARTS of this SCRIPT is RECOMMENDED forAll MySQL SERVERSinchPRODUCTION use! Please READ each STEP carefully!inchorder to log into MySQL to secure it, we ll need the CurrentPassword forThe root user.IfYou ' ve just installed MySQL, Andyou Haven ' t set the root password yet, the password would be a blank,so you should just Press ENTER here. Enter Current Password forRoot (enter forNone):<---Enter the root password now, as we have not set, direct enter OK, successfully used password, moving on ... Setting The root password ensures that nobody can log into the Mysqlroot user without the proper authorisation. Set Root Password? [y/n] Y <---whether to set the root password, of course set, enter Y return to new password: <---Enter the root password and enter the process without any display of re-enter New Password: <---Enter the root password again, and enter the process without any display password updated successfully!Reloading Privilege tables ..... Success! bydefault, a MySQL installation has a anonymous user, allowing Anyoneto log into MySQL without had to had a user account C reated forthem. this was intended only fortesting, and to make the Installationgo a bit smoother. You should remove them before moving into aproduction environment. Remove Anonymous Users? [y/n] Y <---Delete Anonymous user, delete, enter y return ... Success!normally, Root should only is allowed to connect from ' localhost '. Thisensures that someone cannot guess at the root of password from the network. Disallow Root Login remotely? [y/n] Y <---whether to delete the root user is prohibited from Telnet, of course, enter y return ... Success! bydefault, MySQL comes with a database named ' test ' that anyone canaccess. This was also intended only fortesting, and should is removedbefore moving into a production environment. Remove test database and access to it? [y/n] <---whether to delete test database, delete, enter y return-Dropping test database ... Success! -removing privileges on test database ... Success!reloading the privilege tables would ensure that all changes made so farwill take effect immediately. Reload Privilege Tables now? [y/n] Y <---Refresh permissions, enter Y return ... Success!Cleaning up ... all done!IfYou've completed all of the above steps and your mysqlinstallation should now is secure. Thanks forUsing mysql!

Five. Common commands

# turn off MySQL mysqladmin shutdown # or mysqladmin-uroot-p shutdown

CentOS7 mounting mysql5.6.23 (glibc)

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.