Report this

What is the reason for this report?

Remote access mysql ubuntu 12.04

Posted on February 13, 2014

I have two droplets with lamp installation.I enabled private networking to both instances.

I referred links given below and configured them according to mentioned steps. https://www.digitalocean.com/community/articles/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu https://www.digitalocean.com/community/articles/initial-server-setup-with-ubuntu-12-04

Then I started Mysql service and I have created user and granted it full permission via these commands.

CREATE USER ‘webadmin’@‘localhost’ IDENTIFIED BY ‘password’; GRANT ALL PRIVILEGES ON * . * TO ‘webadmin’@‘localhost’;

CREATE USER ‘webadmin’@‘%’ IDENTIFIED BY ‘password’; GRANT ALL PRIVILEGES ON * . * TO ‘webadmin’@‘%’;

I want to enable remote access to Mysql Server that’s why I need to change the bind-address in /etc/mysql/my.cnf file. I have changed to bind-address = 0.0.0.0

Then I restarted mysql service.

now I am trying to connect to mysql server from another droplet. mysql -u webadmin -p -h xx.xx.xx.xx

I got error 2003(HY000). and also lsof -i -P | grep :3306 command returns nothing.

Am I making any mistake??

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.