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 vps_ip -P 3306 -u root -ppasswd ERROR 2003 (HY000): Can’t connect to MySQL server on ‘vps_ip’ (111)
Why can’t login ?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Thanks for the simple instructions. Saved a lot of time for me. Most of the search on this topic is leading to Remote user connections.
It is ok for me .
sed -i.bak “s/127.0.0.1/Your_Droplet’s_IP/g” /etc/mysql/my.cnf; service mysql restart;
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.