hello all!
i've got a problem with connecting to a mysql database.
i call
db.setHostName("127.0.0.1");
db.setDatabaseName("blabla");
db.setUserName("root");
db.setPassword("1234567");
db.setPort(3007);
bool ok = db.open();
if(!ok)
tr("Datenbankfehler"),
sksdatabase.lastError().text());
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
db.setHostName("127.0.0.1");
db.setDatabaseName("blabla");
db.setUserName("root");
db.setPassword("1234567");
db.setPort(3007);
bool ok = db.open();
if(!ok)
QMessageBox::information(0,
tr("Datenbankfehler"),
sksdatabase.lastError().text());
To copy to clipboard, switch view to plain text mode
but i get this error:quote:
Cannot Connect to MySQL Server on 127.0.0.1(10061) QMYSQL:unable to connect
the server is set up with my parameters, what can i do?
Bookmarks