Skip to content

Instantly share code, notes, and snippets.

@Simpfc
Last active July 10, 2019 15:03
Show Gist options
  • Save Simpfc/fcefb4a7ff648a7a281fdc9e763770f3 to your computer and use it in GitHub Desktop.
Save Simpfc/fcefb4a7ff648a7a281fdc9e763770f3 to your computer and use it in GitHub Desktop.
#mysql
# error: "Your password does not satisfy the current policy requirements."
Solution 1:
Because of your password. You can see password validate configuration metrics using the following query in MySQL client:
SHOW VARIABLES LIKE 'validate_password%';
or you can set the password policy level lower, for example:
SET GLOBAL validate_password_length = 6;
SET GLOBAL validate_password_number_count = 0;
Solution 2:
mysql -h localhost -u root -p
mysql>uninstall plugin validate_password;
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
mysql -u root
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
FLUSH PRIVILEGES;
# export only 1 table you would do
mysqldump -u user_name -p your_password your_database_name your_table_name > dump_file.sql
# import
mysql -u your_user -p your_database < dump_file.sql
#Install
yum install wget
wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
md5sum mysql57-community-release-el7-9.noarch.rpm
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
yum install mysql-server
mysql_secure_installation
Q: How to automatically start mysql after server restart (CentOS + other distros)?
A: chkconfig --level 345 mysqld on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment