MySQL Forums
Forum List  »  Install & Repo

Can not connect to remote mysql DB
Posted by: Jason W
Date: February 18, 2014 08:13AM

Hello

I have problems to connect to a remote mysql database.

So my Host is: 10.11.51.6
and the Client is: 10.11.51.5

So if i ask on host for grants with
"SHOW GRANTS FOR 'wiki'@'10.11.51.5';"

I get:

+----------------------------------------------------------------------+
| Grants for wiki@10.11.51.5 |
+----------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'wiki'@'10.11.51.5' WITH GRANT OPTION |
| GRANT SELECT, INSERT ON `mysql`.* TO 'wiki'@'10.11.51.5' |
+----------------------------------------------------------------------+

So this should be ok.

in my.cnf:
bind-address = 10.11.51.6

My PHP code on 10.11.51.5:
$connectionsql = mysql_connect("10.11.51.6" , "wiki" , "PASSWORD");

I get: mysql_connect(): Access denied for user 'wiki'@'10.11.51.5'

why?

Options: ReplyQuote


Subject
Written By
Posted
Can not connect to remote mysql DB
February 18, 2014 08:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.