I need access to a MySQL-Database in one of my Qt 4.0.0 programmes. I got a message: "Driver not loaded, Driver not loaded", when I tried the following code:

Qt Code:
  1. QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
  2. db.setHostName("localhost");
  3. db.setDatabaseName("testdb");
  4. db.setUserName("root");
  5. db.setPassword("");
  6. bool ok = db.open();
  7. if(ok)setText("it works");
  8. else
  9. setText(db.lastError().text());
To copy to clipboard, switch view to plain text mode 

In the docs, it says:
"
You need to get the MySQL installation files. Run SETUP.EXE and choose "Custom Install". Install the "Libs & Include Files" Module. Build the plugin as follows (here it is assumed that MySQL is installed in C:\MYSQL):

cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=C:\MYSQL\LIB\OPT\LIBMYSQL.LIB" mysql.pro
nmake
"
I have never installed any MySQL and I don't understand why I have to do this. After all, I don't necessarily want to access a database on my computer, it could also be on a remote computer where MySQL is installed. So I think I must have got something wrong. Can you tell me what to do?

Thanks.