qlands
24th November 2011, 12:47
Hi,
I am trying to use mysql embedded. Following the QT documentation I built the QT plugin using -lmysqld .
Now, I have this code:
QSqlDatabase mydb;
mydb = QSqlDatabase::addDatabase("QMYSQL","mydb"); //Add the database connector to MySQL
But I get the following message and the application cannot continue:
mysql_embedded: Table 'mysql.plugin' doesn't exist
111124 15:35:15 InnoDB: The InnoDB memory heap is disabled
111124 15:35:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins
111124 15:35:15 InnoDB: Compressed tables use zlib 1.2.3
111124 15:35:15 InnoDB: Using Linux native AIO
111124 15:35:15 InnoDB: Initializing buffer pool, size = 128.0M
111124 15:35:15 InnoDB: Completed initialization of buffer pool
111124 15:35:15 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name /usr/local/mysql-5.5.18-linux2.6-x86_64/data/ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
Look like the the embedded driver is using /usr/local/mysql-5.5.18-linux2.6-x86_64/data/ibdata1 as the data directory and it does not have access. But how can I change it?
Many thanks,
Carlos.
I am trying to use mysql embedded. Following the QT documentation I built the QT plugin using -lmysqld .
Now, I have this code:
QSqlDatabase mydb;
mydb = QSqlDatabase::addDatabase("QMYSQL","mydb"); //Add the database connector to MySQL
But I get the following message and the application cannot continue:
mysql_embedded: Table 'mysql.plugin' doesn't exist
111124 15:35:15 InnoDB: The InnoDB memory heap is disabled
111124 15:35:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins
111124 15:35:15 InnoDB: Compressed tables use zlib 1.2.3
111124 15:35:15 InnoDB: Using Linux native AIO
111124 15:35:15 InnoDB: Initializing buffer pool, size = 128.0M
111124 15:35:15 InnoDB: Completed initialization of buffer pool
111124 15:35:15 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name /usr/local/mysql-5.5.18-linux2.6-x86_64/data/ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
Look like the the embedded driver is using /usr/local/mysql-5.5.18-linux2.6-x86_64/data/ibdata1 as the data directory and it does not have access. But how can I change it?
Many thanks,
Carlos.