MySQL Forums
Forum List  »  Newbie

Re: MySQL remote access
Posted by: Jack LUNN
Date: July 22, 2014 09:23AM

Thanks Rick
It feels like after 10 days or so I'm finally getting close.
I'm not currently worried about the front-end language because once I can access the MySQL databases on the server from DOS on another PC, I'm pretty sure I will be OK.

In order to drill this down a bit I am using the following info...

My pc is on 192.168.1.2 - this is currently dynamic.
I can ping the server ( I have setup static ip ... 200 )
ping 192.168.1.200 - all OK ( this suggests I can 'see' the server )
I have a MySQL database on the server called jaxdb.

I have checked users on the server (192.168.1.200) with...
SELECT user,host FROM mysql.user; and the list includes
root on localhost and
jack on 192.168.1.2

I have used ...
GRANT ALL PRIVILEGES ON jaxdb.* TO 'jack'@'192.168.1.2' IDENTIFIED BY 'pass';
on the server successfully

You said 'Test it via mysql -u root -h host.name.or.IP -p '
Not exactly sure about this....

I have tested the following from this PC with...
mysql -u jack -h 192.168.1.200 -p
Enter password .... pass (it waited for 8-10 seconds then...)
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.200' (10060)

I think the command means....
mysql -u jack -h 192.168.1.200 -p
load MySQL with the user jack on IP 192.168.1.200 and ask for password.
If I run this from a DOS prompt on my PC (192.168.1.2) i think it should work !!!

My MySQL password on the server is 'mysql'
I also tried...
mysql -u root -h 192.168.1.200 -p
Enter password .... mysql
Same result....

This looks like it can't 'find' the server but the 'ping' suggests otherwise.
I will now try to modify the .ini file on the server which has been suggested elsewhere.

Thanks again for your help and please let me know whether I've made a mistake somewhere.

Incidentally my C# connection string for testing is...
"datasource=127.0.0.1;port=3306;username=root;password=mysql";
This works locally
But this does not
"datasource=192.168.1.200;port=3306;username=jack;password=pass";
Unable to connect to any of the specified MySQL hosts

(getting brain-fade again)

Cheers

Jack

Options: ReplyQuote


Subject
Written By
Posted
July 19, 2014 03:20AM
July 20, 2014 05:16AM
July 20, 2014 09:09AM
July 22, 2014 02:13AM
July 22, 2014 11:15AM
Re: MySQL remote access
July 22, 2014 09:23AM
July 23, 2014 04:05AM
July 20, 2014 11:49AM
July 20, 2014 10:42PM
July 20, 2014 11:27PM


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.