[lucid] MySQL fails to install db (mysql_install_db) in specified directory due to AppArmor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-dfsg-5.1 (Ubuntu) |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Release: Lucid
Version: 5.1.41-3ubuntu12.3
When issuing mysql_install_db --datadir=
mysql1# mysql_install_db --datadir=
Installing MySQL system tables...
100622 19:30:30 [Warning] Can't create test file /mnt/prueba/
100622 19:30:30 [Warning] Can't create test file /mnt/prueba/
Installation of system tables failed! Examine the logs in
/mnt/prueba for more information.
You can try to start the mysqld daemon with:
shell> /usr/sbin/mysqld --skip-grant &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /mnt/prueba that may be helpful.
The latest information about MySQL is available on the web at
http://
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://
Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /usr/scripts/
The Issue is related to AppArmor, given that when it is disable, MySQL doesn't fail to install. Now, given the issue, the message should contain hints specifying that AppArmor is enabled and needs to be disabled, or the profile needs to be changed to support the new isntallation directory.
tags: | added: apparmor |
Changed in mysql-dfsg-5.1 (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
tags: | removed: apparmor |
You'll need to add a rule in /etc/apparmor. d/usr.sbin. mysqld to allow mysqld
access to your chosen datadir. Something like
/opt/mysqld/** rwk,
underneath the line:
/var/lib/mysqld/* rwk,