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??
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!
Hi mahiyar, <br> <br>Everything seems to be ok in the MySQL configuration file but, can you post the output of <code>netstat -ntulp</code>
Hi, <br>I have a similar problem: <br> <br>Trying to get remote access to the mysql server on Magento server (188.226.210.183). <br> <br>I have created a DB user with access from remote servers host = % <br>And I have altered the bind-address in my.cnf file to be 188.226.210.183. <br> <br>I then did a mysql restart and a server reboot (just in case). <br> <br>I checked that the port was LISTEN(ING). And all looks good there: <br>tcp 0 0 188.226.210.183:3306 0.0.0.0:* LISTEN <br> <br>However I still cannot connect remotely - <br>“ERROR 2013 (HY000): Lost connection to MySQL server at ‘waiting for initial comunication packet’, system error: 0” <br> <br>Have I missed a step? <br>
<blockquote>lsof -i -P | grep :3306 command returns nothing.</blockquote>That means MySQL is not running. Try starting it: <br><pre>sudo service mysql start</pre>
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.