Home » U++ Library support » U++ SQL » Cannot connect to MySQL database
Cannot connect to MySQL database [message #36861] |
Sat, 14 July 2012 01:28  |
Small_Dwarf
Messages: 8 Registered: July 2011
|
Promising Member |
|
|
Hello,
I've installed MySQL Server 5.5 on Windows Vista.
I've removed all compiler and linker errors (especially due to adding libmysql.dll to bin directory of mingw).
But I can't connect to my database called "test".
My code is the following:
MySqlSession session;
if(session.Connect("root",NULL,"test")){
PromptOK("yes :-)");
}
else {
PromptOK("ERROR: Unable to connect to database. :-(");
SetExitCode(1);
}
(The PromptOKs are there because debugging doesn't work.)
I always see the second (= the error) message.
If I execute "mysql --user=root test" in the correct path (i.e. "C:\Program Files\mysql\MySQL Server 5.5\bin") the mysql monitor shows up and I can execute SQL statements.
Does anybody know what to do?
Thanks in advance!
[Updated on: Sat, 14 July 2012 21:16] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sun Apr 20 12:03:50 CEST 2025
Total time taken to generate the page: 0.02693 seconds
|