Skip to content

Instantly share code, notes, and snippets.

@ayonliu
Last active December 8, 2016 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayonliu/3b44d815da6d64181dd574055f0b6cd3 to your computer and use it in GitHub Desktop.
Save ayonliu/3b44d815da6d64181dd574055f0b6cd3 to your computer and use it in GitHub Desktop.
Install MySQL on CentOS 7

Install MySQL on CentOS 7

Install MySQL on CentOS 7 How to Install MySQL on CentOS 7

rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm,
yum install mysql-community-server
mysql_secure_installation

Failed! Error: Your password does not satisfy the current policy requirements

add validate_password_policy=LOW in file /etc/my.cnf

Forget password:question:

vim /etc/my.cnf

add skip-grant-tables

systemctl stop mysqld
systemctl start mysqld
mysql -uroot
use mysql;
update user set authentication_string=PASSWORD("youpassworld") where User='root';
flush privileges;
exit

Access remotely:

use mysql;
update user set Host= "%" where User="root";
flush privileges;

systemctl restart mysqld

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment