Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

myODBC for MySQL on IIS both on vista 1

Status
Not open for further replies.

hovercraft

Technical User
Jun 19, 2006
236
US
I have installed MySQL and PHP on vista ultimate running IIS. Everything works fine both within our network and outside of it.
Now I'm trying to connect via the MyODBC 5.1 on another vista machine with user "root" and the root password.
I'm getting the Access Denied for user 'root' @ .... then it gives my local pc name in the error not the pc name that is running mysql.

My first question is, does anything need to be configured on mysql server in order for someone to connect via odbc as opposed to making a connection via php?

Second question is, do I need to do anything special to the odbc driver on the client pc. I.E. set the server address to something other than the ip of the server machine?

Thanks for any assistance,
Hovercraft
 
You need to set the permissions in MYSQL to allow you to connect form that particular location. MYSQL is specific about locations.

Its not the same thing to connect from the machine that's running MYSQL that it is to connect form somewhere else.

Normally PHP will be running on the same machine so no suhc location problem will exist, but PHP is on running a different machine you'll need to specify a location that you can be allowed to connect from.



You can do it from the Mysql Administrator app, or by issuing a GRANT query directly
Code:
GRANT ALL ON tablename TO 'username'@'location'


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thanks Phil

Your reply was clear and informative! I noticed that when creating a new user, the default host is 'any host'. Does 'any host' act as a wildcard or does this need to be replaced by an actual host. Some like '@companyserver.local'?

-I've tried to type this 3x's and the power keeps going out.
 
It should be 'localhost' , not 'any host'.

localhost is the denomination for the machine MYSQL is installed on.

Any other host can be specified either by IP address, computer name or even URL.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
I keep getting the same "access denied" error.
The error is saying " @mycomputer.mydomain.local"

Both computers are on the same subnet and I have setup the user with all privileges for hosts "localhost, mycomputer.mydomain.local, and for mydomain.local"

I can ping the mysql pc by both ip and name.
When I'm trying to set up the dsn I've tried using the mysql's pc ip = 192.168.27.111 and it's computername still access is denied.

Any thoughts?


 
adding a host to user = root for mycomputer.mydomain.local will allow root to connect from a computer in our intranet but still no go for any other user, even though they are setup with privileges.

I suppose I could setup all the users with odbc connector as root, but I'm not comfortable with that.
 
whoa! This is even more strange...
I tried with a user = "dave" and it worked, but when I try with "davefitzgerald" it doesn't. both users are setup identical.

Is there a max length for user names?

Sorry, for the many posts I've got to get this setup by Sunday.
 
Username can be a max of 16 characters so your user name is well within the limits.

I'd look at the password for each, are you sure you are typing it correctly for the connection?

I tried using that user name, and have no problems with it.


how are you defining permissions? with Mysql Administrator?


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
...(hangs head in shame)...the user name was spelled wrong.

Once I set up the host per your suggestions and spelled the user's name correctly, everything works great!

Thanks again for all your help Phil.

Yes, I am using MySQL Administrator.

Hovercraft
 
Glad you got it working right.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top