how can connect mysql database in my vps?
I have installed mysql database on my vps ip, and input the following command when to login mysql.
mysql> GRANT ALL PRIVILEGES ON . TO ‘root’@’%'IDENTIFIED BY 'passwd’ WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
service mysql restart
Now i want to login mysql database on my vps ip from remote machine.
mysql -h vpsip -P 3306 -u root -ppasswd
ERROR 2003 (HY000): Can’t connect to MySQL server on 'vpsip’ (111)
Why can’t login ?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.