MySQL Ubuntu 19.10安装错误-系统架构目录不存在

问题描述 投票:0回答:1

我已经尝试在ubuntu19.10安装中执行MySQL的全新安装但是,在安装过程中,尝试在Ubuntu 191.10上安装MySql时,我仍然遇到以下错误。

在/var/log/MySql/error.log中:

2020-03-31T02:04:00.133031Z 1 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement 'CREATE SCHEMA mysql DEFAULT COLLATE utf8mb4_0900_ai_ci' failed with error code = 1049, error message = 'System schema directory does not exist.'.
2020-03-31T02:04:00.133738Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2020-03-31T02:04:00.134159Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-03-31T02:04:00.662756Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19-0ubuntu0.19.10.3)  (Ubuntu).

安装出现以下错误:

$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (8.0.19-0ubuntu0.19.10.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-8.0 (8.0.19-0ubuntu0.19.10.3) ...
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
2020-03-31T02:04:00.134301Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open 'abstractions/mysql'
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.
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2020-03-30 21:04:03 CDT; 9ms ago
  Process: 17035 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)

Mar 30 21:04:03 ubuntu-vm systemd[1]: mysql.service: Control process exited, code=exited, status=1/FAILURE
Mar 30 21:04:03 ubuntu-vm systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 30 21:04:03 ubuntu-vm systemd[1]: Failed to start MySQL Community Server.
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
mysql linux ubuntu
1个回答
0
投票

尝试先安装mariadbsudo apt install mariadb-server之后,您通常可以使用mysql,但是如果遇到任何错误,请尝试使用以下命令重新安装mysql:sudo apt install mysql-server

[Mariadb与MySQL相同,只是甲骨文收购MySQL之后的一个开源项目,因此员工退出了MySQL以创建具有MySQL高兼容性的新SGBD。

© www.soinside.com 2019 - 2024. All rights reserved.