How to fix it ?
STEP 1: Change mysql config :
STEP 1: Change mysql config :
vi /etc/mysql/my.cnf
Comment out following lines or edit to your client ip :#bind-address = 127.0.0.1
#skip-networking
Restart mysql server:service mysql restart
STEP 2: Change GRANT privilege :Login MySQL using command line .
Then run a command like below to grant access for user. Replace 'username' and 'password' with your username and password.
CREATE USER 'username'@'%' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;
* '%' mean you can remote access from any ip address, You can replace it with a specified ip address.
FLUSH PRIVILEGES;
If it's still not working. Let's check your server firewall (iptables ...) and client firewall (windows firewall, antivirus software)
0 nhận xét:
Post a Comment