mysql重启报错
[错误] 无法初始化内置插件。
2022-07-15T06:54:57.731919Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2022-07-15T06:54:57.731950Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2022-07-15T06:54:57.731956Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2022-07-15T06:54:58.339478Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-07-15T06:54:58.339501Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-07-15T06:54:58.339504Z 0 [ERROR] Failed to initialize builtin plugins.
2022-07-15T06:54:58.339507Z 0 [ERROR] Aborting
发现是权限不足:给予mysql目录权限就行
chmod -R 777 /var/lib/mysql
[root@localhost ~]# mysql -uroot -pTest123!
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.38 MySQL Community Server (GPL)
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.