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

Lukejv :

I have attempted to conduct a clean install of MySQL on my ubuntu19.10 install However during installs I continue to get the following errors while attempting to install MySql on Ubuntu 191.10.

within /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).

Installing gives the following errors:

$ 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)
Judikael :

Try to install mariadb first sudo apt install mariadb-server After this you can normally use mysql but if you have any error try to reinstall mysql with this command : sudo apt install mysql-server

Mariadb is the same as MySQL it’s just open source project after the buy of MySQL by oracle so an employee have quit MySQL to create a new SGBD with an high compatibility of MySQL.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=394980&siteId=1