Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Cannot connect to MySQL database
icon5.gif  Cannot connect to MySQL database [message #36861] Sat, 14 July 2012 01:28 Go to previous message
Small_Dwarf is currently offline  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

 
Read Message icon5.gif
Read Message icon3.gif
Previous Topic: Lowercase field name in table - error
Next Topic: MySQL Example: NativeMySql/NativeMySql.sch: No such file or directory
Goto Forum:
  


Current Time: Fri May 09 22:10:13 CEST 2025

Total time taken to generate the page: 0.00734 seconds