Linux - CentOS7.0 install 64-bit Mysql5.6.27

My Linux version info:

LSB Version:    :core-4.1-amd64:core-4.1-noarch
Description:    CentOS Linux release 7.0.1406 (Core)
Release:        7.0.1406

MySQL database version: mysql-community-release-el7-5.noarch.rpm

 

Step 1 Download the rpm file that supports Mysql-sever.
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

 

Step 2 Install the rpm package
# rpm -ivh mysql-community-release-el7-5.noarch.rpm

 

Step 3 Install mysql-sever
# yum install mysql-community-server

 

Step 4 Start mysql
# service mysqld restart

 

Step 5 Modify the mysql password:
#mysql -u root mysql
#UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
#FLUSH PRIVILEGES;
#quit;

 

Step 6 Restart the mysql service:
#service mysql restart

 

Step 7 Log in to the mysql database:
#mysql -uroot -p
Enter the new password

If the following prompt message appears, it means the mysql installation is successful.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.27 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326944323&siteId=291194637