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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delphi 7 and MySQL server

Status
Not open for further replies.

emanueleqr

Programmer
Dec 16, 2003
3
0
0
IT
Hi!

I'm trying to write a CGI executable for an intranet server
that runs MySQL. I used to do that often with Oracle, and it was really ok. Now, I use the SQLconnection component to connect to the server, but there's no way to set the "connected" property to "true". I set the correct driver (MySql) and provide that every dll is available, but I keep getting an "Invalid username/password" message. First, this happens even if I type "Rats" as the hostname in the Params of the component; I mean, it's not a user/pwd problem, 'cause I cannot be connected with "Rats", so the message I get is a bit confusing. The question is: since the CGI executes on the server machine, what should I type in the "Hostname" and "Database" params? I admit I don't know MySQL very well. I tried with the real network id as the "hostname" (or 127.0.0.1), and "localhost" (that's the default db name my customer has for his db) as the "database", and it doesn't work. What should I type???
Please help me!! Thank u

Emanuele, Italy
 
you should try to see that in your mysql.user table you have set a username, password and hostname combination that matches your credentials. to stop worrying about the hostname param in mysql authentication, set % at hostname for the desired user.

try connecting from the command prompt to test and if all is ok, you should be able to connect from delphi. post back if you need more help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top