QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); db.setPort(3306); db.setHostName("92.53.98.20"); db.setDatabaseName("fr4402"); db.setUserName("fr4402"); db.setPassword("0123456"); bool ok = db.open();