Fatal error cannot open and lock privilege tables
Fatal error cannot open and lock privilege tables
APPLIES TO:
MariaDB - Community Server 10.6
SYMPTOMS
The custom system variables and options:
[mariadb] |
Starting mariadb.service fails with privilege tables no exist.
2024-03-04 23:37:09 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded |
CAUSE
The Mariadb datadir path is /var/lib/mysql as default. After change datadir, must copy or install system tables to new path.
SOLUTION
sudo mariadb-install-db --defaults-file=/etc/my.cnf --datadir=/data/mysql --user=mysql |
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.

