DebuggingMySQL
Differences between revisions 1 and 10 (spanning 9 versions)
|
Size: 2417
Comment:
|
Size: 4186
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 9: | Line 9: |
| Thank you for taking the time to report this bug and helping to make Ubuntu better. Could you please provide the following information: | Thank you for taking the time to report this bug and helping to make Ubuntu better. Could you please provide the following information: |
| Line 15: | Line 17: |
| * apparmor audit messages related to mysqld: | * apparmor audit messages related to mysqld. The output of the command: |
| Line 17: | Line 19: |
| /var/log/kern.log | egrep 'audit\(|apparmor|selinux|security' /var/log/kern.log * mysqld apparmor profile: /etc/apparmor.d/usr.sbin.mysqld * list of mysqld apparmor profiles: ls -l /etc/apparmor.d/usr.sbin.mysqld* |
| Line 26: | Line 36: |
* directory listing of mysql datadir (by default /var/lib/mysql): ls -l /var/lib/mysql ======================= Relevant error messages |
|
| Line 32: | Line 53: |
| 1. Look in /var/log/daemon.log for error messages about mysqld and mysqld_safe failing to start or stop. | |
| Line 33: | Line 55: |
| 2. If mysqld is not able to open files (permission denied errors) or doesn't find files, it may be related to an incorrect mysqld apparmor profile. a. Check whether there are audit messages related to mysqld (acces denied) in the kernel.log file. a. Check if mysql is configured with a custom datadir (/etc/mysql/my.cnf and files in /etc/mysql/conf.d/*). a. Check if the mysqld apparmor profile has been updated to include the custom datadir in it. If not the problem is related to an incorrect mysqld apparmor profile (/etc/apparmor.d/usr.sbin.mysqld). It needs to be updated. a. Reply with the [[#update-apparmor-profile|AppArmor stock reply]]. |
|
| Line 41: | Line 68: |
<<Anchor(update-apparmor-profile)>> === Update mysqld AppArmor profile === Mark the bug as '''Invalid''' using the following stock reply: {{{ Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that you're using a non-standard location for your data directory (datadir option in my.cnf). However mysqld apparmor profile (in /etc/apparmor.d/usr.sbin.mysqld) hasn't been updated to allow access to the custom directory. See https://wiki.ubuntu.com/DebuggingApparmor#Debugging%20procedure for more information on how to update mysqld apparmor profile. }}} |
This page is part of the debugging series — pages with debugging details for a variety of Ubuntu packages. |
Contents |
Introduction
How to file
Thank you for taking the time to report this bug and helping to make Ubuntu better.
Could you please provide the following information:
* content of /var/log/daemon.log related to mysql processes:
/var/log/daemon.log
* apparmor audit messages related to mysqld. The output of the command:
egrep 'audit\(|apparmor|selinux|security' /var/log/kern.log
* mysqld apparmor profile:
/etc/apparmor.d/usr.sbin.mysqld
* list of mysqld apparmor profiles:
ls -l /etc/apparmor.d/usr.sbin.mysqld*
* mysql configuration stripped of private information (such as password):
/etc/mysql/my.cnf
* extra mysql configuration from the conf.d directory:
/etc/mysql/conf.d/
* directory listing of mysql datadir (by default /var/lib/mysql):
ls -l /var/lib/mysql
=======================
Relevant error messages
Debugging procedure
1. Look in /var/log/daemon.log for error messages about mysqld and mysqld_safe failing to start or stop.
2. If mysqld is not able to open files (permission denied errors) or doesn't find files, it may be related to an incorrect mysqld apparmor profile.
- Check whether there are audit messages related to mysqld (acces denied) in the kernel.log file.
- Check if mysql is configured with a custom datadir (/etc/mysql/my.cnf and files in /etc/mysql/conf.d/*).
- Check if the mysqld apparmor profile has been updated to include the custom datadir in it. If not the problem is related to an incorrect mysqld apparmor profile (/etc/apparmor.d/usr.sbin.mysqld). It needs to be updated.
Reply with the AppArmor stock reply.
How to Triage
Stock Reply
Update mysqld AppArmor profile
Mark the bug as Invalid using the following stock reply:
Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that you're using a non-standard location for your data directory (datadir option in my.cnf). However mysqld apparmor profile (in /etc/apparmor.d/usr.sbin.mysqld) hasn't been updated to allow access to the custom directory. See https://wiki.ubuntu.com/DebuggingApparmor#Debugging%20procedure for more information on how to update mysqld apparmor profile.
How to Forward
Known bugs
- The debian-sys-maint user is not available and thus the status script reports a failure from mysqld.
- Mysql configuration uses non-standard location for its data files and thus mysqld apparmor profile needs to be updated.
Non-bugs
DebuggingMySQL (last edited 2010-07-09 22:01:04 by pool-71-252-251-234)