sudo apt-get install mysql-server error message:
Renaming removed Key_buffer and myisam-recover options (if present)
Job for Mysql.service failed because the control process exited with error code. See "Systemctl Status Mysql.service" and "Journalctl-xe" for details.
Invoke-rc.d:initscript MySQL, action "start" failed.
DPKG: Error processing package mysql-server-5.7 (--configure):
Child process installed Post-Installation script returns error status 1
Dpkg: Dependency issues make the Mysql-server configuration work impossible to continue:
The Mysql-server relies on mysql-server-5.7, however:
Package mysql-server-5.7 is not yet configured.
DPKG: Error processing package mysql-server (--configure):
Dependency issues-Still not configured
First, the conclusion: AppArmor Setup has a problem, will permission some of the installation steps of the Deny apt, but did not carefully see the specific reason
Workaround: Directly disable the AppArmor for MySQL settings (more rough, production environment, or to carefully study what is the problem of the settings)
sudo ln-s/etc/apparmor.d/usr.sbin.mysqld/etc/apparmor.d/disable/ sudo apparmor_parser-r/etc/apparmor.d /usr.sbin.mysqld
(Look at this in more detail: Https://help.ubuntu.com/community/AppArmor)
Continue with installation: sudo apt-get install Mysql-server
Here is the process of error checking:
1. "Systemctl status Mysql.service" and "journalctl-xe" have tried to get valuable information
2. vi/var/log/mysql/error.log MySQL log no information
3. Cd/var/log && LS-LRT found that the Dpkg.log syslog is relatively large.
4. View the discovery to run mysql_install_db separately
5. mysql_install_db is obsolete, the new version should be mysqld--initialize--user=mysql
6. Mysqld--initialize--user=mysql Error: "/var/lib/mysql/" already exists, delete and run again, new BUG: mkdir Permission denied
7. chmod 777/var/lib or Permission denied
8. Once again Cd/var/log && Ls-lrt accidentally saw the Kern.log
audit:type=1400 Audit (1475809767.205:738): apparmor= "DENIED" operation= "open" profile= "/usr/sbin/mysqld" Name= "/var.lib/mysql/" pid=7611 comm= "mysqld" requested_mask= "R" denied_mask= "R" Fsuid=0 ouid=123
9. Google a bit apparmor found that the rights management-related, disable the MySQL profile, OK.
Ubuntu Install MySQL problem