簡體   English   中英

MySQL Ubuntu 19.10 安裝錯誤 - 系統架構目錄不存在

[英]MySQL Ubuntu 19.10 Installation Error - System Schema directory does not exist

我試圖在我的 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)

嘗試先安裝 mariadb sudo apt install mariadb-server在此之后您可以正常使用 mysql 但如果您有任何錯誤嘗試使用以下命令重新安裝 mysql : sudo apt install mysql-server

Mariadb 和 MySQL 一樣,只是 oracle 收購 MySQL 后的開源項目,所以有員工退出 MySQL 創建一個新的 SGBD,對 MySQL 的兼容性高。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM