MYSQL5.7.9 change the password settings

On Centos7, for MySQL5.7 open remote connections.

1. Modify /etc/my.cnf

[mysqld]
validate_password=off

2. enter the command line mysql

use mysql;
GRANT ALL ON *.* TO username@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; flush privileges;//重要

3. regarding firewalls

firewall-cmd --zone=public --add-port=3306/tcp --permanent firewall-cmd --reload

4. it is connected in Navicat.

(adsbygoogle = window.adsbygoogle || []).push({});

Guess you like

Origin www.cnblogs.com/theworld/p/11611930.html