Koozali.org: home of the SME Server

MyODBC access question

Des Dougan

MyODBC access question
« on: September 03, 2002, 01:22:57 AM »
I'm trying to access a MySQL database on my test box via MyODBC. This box is on a different network (192.168.100.1, internal; 192.168.0.2, external)  from my production server (192.168.0.1, internal). I set it up this way to emulate access to the test box from the outside world.

However, although I have set up the MySQL user to access from any host ("%"), I am unable to connect from my PC (192.168.0.65). I am able to connect successfully to a db on the production box.

I'm obviously missing something, but I can't work out what. Can anyone help?

Thanks,

Des Dougan

Dan G.

Re: MyODBC access question
« Reply #1 on: September 03, 2002, 02:49:26 AM »
I don't know if this is in the ballpark or not, but I got mine to work with an explicit IP address, a la:

> grant all privileges on yourTablePrefix.*  to yourUsername@your.ip.address identified by 'yourPassword';

> flush privileges;

Are you trying to access as 'root' or do you have a specific username for that database, already given god-access with a 'grant all'?

Dan

Des Dougan

Re: MyODBC access question
« Reply #2 on: September 03, 2002, 04:05:30 AM »
Dan,

Thanks for your note. I had already tried this (via phpMyAdmin) to no avail. I tried again from the command line, with the same results. I thought it should work, but I'm confused as to why it won't....

I'm logging in with a specific user, not root.

Thanks,

Des

Dan G.

Re: MyODBC access question
« Reply #3 on: September 03, 2002, 05:43:58 AM »
Two suggestions:

1.  If you haven't walked thru Darrell May's how-to, it's here: http://www.myezserver.com/downloads/mitel/howto/myodbc-howto.html

2.  To rule out any myODBC problems, you might try connecting with mysqlFront, available here: http://www.anse.de/mysqlfront/

Please post back when you "crack the code" :)

Dan

Noah Berlove

Re: MyODBC access question
« Reply #4 on: September 03, 2002, 07:06:19 AM »
Des,

Which of the server's IP addresses did you specify in the DSN (the internal or external)?  You may need to add your 192.168.0.0 network as a Local Network on your test server.

Noah

rob wellesley

Re: MyODBC access question
« Reply #5 on: September 03, 2002, 08:31:33 AM »
this may seem obvious but - won't the firewall in your 192.168.100.1 box  block access to the db on that box from your 192.168.0.X network?

rob

Des Dougan

Re: MyODBC access question
« Reply #6 on: September 04, 2002, 07:17:11 AM »
My thanks to Rob, Noah and Dan.

The problem was indeed not defining the 192.168.0.x netword as a local network, so the firewall was blocking the port.

Checking the network settings is something I should have thought of... it never ceases to amaze me how working in IT brings so many opportunities to learn humility :)

Cheers,

Des