How can I connect to databse for access remote?

  • Posted October 21, 2013

Hi guys!

I try to connect to my DB from navicat but is not possible. I installed LAMP as indicated in this guide ( ), but they refused me via remote access and do not know how to configure it to give permissions.

how to allow remote access to mysql?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hey CFRANCO80, did you find the way to connect remotely to your MySQL server using NaviCat? or somebody knows if this is possible?

restart mysql on ubuntu: sudo service mysql restart

Where did you get that command from? <br> <br>Did you add a user for connecting remotely? See <a href=“”></a> <br> <br>Replace <code>localhost</code> with <code></code> where <code></code> is your home IP address.

Hi Pablo, <br> <br>I tried entering the following command but it gives me error <br> <br># mysql -u root -p <br> <br>mysql> update db set Host=’‘ where db=’db_name‘; <br>ERROR 1046 (3D000): No database selected <br> <br>think you are missing a step? <br> <br> <br>

Did you grant your MySQL user privileges to access the database on the public IP?

Hello Pablo, <br> <br>Thank you very much for the help. <br> <br>Restart MySQL? <br>Yes, yes I did. <br> <br>How many remote hosts need to connect to MySQL? <br>I need to connect remotely from 2 teams mac os , one at home and one in my work. <br> <br>the remote hosts are trying to connect to MySQL Also behind a firewall? <br>No, because I could connect to other servers without problem. <br> <br>any other idea? <br> <br>Best regards

Firewall looks okay. After you changed the <code>bind-address</code>, did you restart MySQL? <br> <br>Also, instead of opening up the MySQL port to the entire world, are you able to limit it to a few IPs? The question is, how many remote hosts need to connect to MySQL? If (i) a few and (ii) they have static IPs, then you’re best advised to limit MySQL access to those IPs, only. <br> <br>Lastly, are the remote hosts trying to connect to MySQL also behind a firewall?

Hi Pablo! <br> <br>This is my firewall <br> <br># iptables -L -n <br>Chain INPUT (policy DROP) <br>target prot opt source destination
<br>ACCEPT all – state RELATED,ESTABLISHED <br>DROP tcp – tcp flags:0x3F/0x00 <br>DROP tcp – tcp flags:!0x17/0x02 state NEW <br>DROP tcp – tcp flags:0x3F/0x3F <br>ACCEPT all –
<br>ACCEPT tcp – tcp dpt:80 <br>ACCEPT tcp – tcp dpt:443 <br>ACCEPT tcp – tcp dpt:25 <br>ACCEPT tcp – tcp dpt:26 <br>ACCEPT tcp – tcp dpt:465 <br>ACCEPT tcp – tcp dpt:110 <br>ACCEPT tcp – tcp dpt:995 <br>ACCEPT tcp – tcp dpt:143 <br>ACCEPT tcp – tcp dpt:993 <br>ACCEPT tcp – tcp dpt:22 <br>ACCEPT tcp – tcp dpt:22 <br>ACCEPT tcp – tcp dpt:3306 <br> <br>Chain FORWARD (policy ACCEPT) <br>target prot opt source destination
<br> <br>Chain OUTPUT (policy ACCEPT) <br>target prot opt source destination
<br> <br>see something strange?

Check out <a href=“”>How To Setup a Basic IP Tables Configuration on Centos 6</a>

Hi Pablo, <br>as I can see this?