我正在尝试在我的 chromebook mariadb 中下载,我正在使用 arch linux 但在安装后遇到此错误
i am tring to download in my chromebook mariadb and i am using archlinux but facing this error after installing
sudo systemctl start mysql
发生此错误
mariadb.service 的作业失败,因为控制进程已退出并显示错误代码。
有关详细信息,请参阅“systemctl status mariadb.service”和“journalctl -xeu mariadb.service”。
x mariadb.service - MariaDB 10.6.5 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Drop-In: /run/systemd/system/service.d
`-zzz-lxc-service.conf
Active: failed (Result: exit-code) since Sun 2021-12-12 14:23:36 IST; 1h 52min ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 5842 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 5843 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-en>
Process: 5851 ExecStart=/usr/bin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 5851 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Buffer pool(s) load completed at 211212 14:23:36
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '0.0.0.0'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '::'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Aborting
Dec 12 14:23:36 penguin mariadbd[5851]: Warning: Memory not freed: 280
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Failed with result 'exit-code'.
Dec 12 14:23:36 penguin systemd[1]: Failed to start MariaDB 10.6.5 database server.
...skipping...
x mariadb.service - MariaDB 10.6.5 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Drop-In: /run/systemd/system/service.d
`-zzz-lxc-service.conf
Active: failed (Result: exit-code) since Sun 2021-12-12 14:23:36 IST; 1h 52min ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 5842 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 5843 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-en>
Process: 5851 ExecStart=/usr/bin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 5851 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Buffer pool(s) load completed at 211212 14:23:36
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '0.0.0.0'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '::'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Aborting
Dec 12 14:23:36 penguin mariadbd[5851]: Warning: Memory not freed: 280
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Failed with result 'exit-code'.
Dec 12 14:23:36 penguin systemd[1]: Failed to start MariaDB 10.6.5 database server.
[harshpatel990@penguin ~]$ journalctl -xeu mariadb.service
-- The job identifier is 688 and the job result is failed.
Dec 12 13:54:05 penguin systemd[1]: Starting MariaDB 10.6.5 database server...
-- Subject: A start job for unit mariadb.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A start job for unit mariadb.service has begun execution.
--
-- The job identifier is 737.
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] /usr/bin/mariadbd (server 10.6.5-MariaDB) starting as process 5780 ...
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Number of pools: 1
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Using Linux native AIO
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Completed initialization of buffer pool
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: 128 rollback segments are active.
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: 10.6.5 started; log sequence number 33062; transaction id 4
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not load>
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Buffer pool(s) load completed at 211212 13:54:06
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] Server socket created on IP: '0.0.0.0'.
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] Server socket created on IP: '::'.
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [ERROR] Aborting
Dec 12 13:54:06 penguin mariadbd[5780]: Warning: Memory not freed: 280
Dec 12 13:54:06 penguin systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- An ExecStart= process belonging to unit mariadb.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Dec 12 13:54:06 penguin systemd[1]: mariadb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
Dec 12 13:54:06 penguin systemd[1]: Failed to start MariaDB 10.6.5 database server.
-- Subject: A start job for unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A start job for unit mariadb.service has finished with a failure.
--
-- The job identifier is 737 and the job result is failed.
Dec 12 14:23:35 penguin systemd[1]: Starting MariaDB 10.6.5 database server...
-- Subject: A start job for unit mariadb.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A start job for unit mariadb.service has begun execution.
--
-- The job identifier is 786.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] /usr/bin/mariadbd (server 10.6.5-MariaDB) starting as process 5851 ...
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Number of pools: 1
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Using Linux native AIO
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Completed initialization of buffer pool
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: 128 rollback segments are active.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: 10.6.5 started; log sequence number 33074; transaction id 4
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not load>
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Buffer pool(s) load completed at 211212 14:23:36
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '0.0.0.0'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '::'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Aborting
Dec 12 14:23:36 penguin mariadbd[5851]: Warning: Memory not freed: 280
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- An ExecStart= process belonging to unit mariadb.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
Dec 12 14:23:36 penguin systemd[1]: Failed to start MariaDB 10.6.5 database server.
-- Subject: A start job for unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A start job for unit mariadb.service has finished with a failure.
--
-- The job identifier is 786 and the job result is failed.
当尝试登录时
mysql -u root -p
输入密码:
错误 2002 (HY000):无法通过套接字“/run/mysqld/mysqld.sock”连接到本地服务器 (111)
[1]+ 出口 1 mysqld_safe --skip-grant-tables
我认为你的路径(/var/lib/mysql)是空的或者配置有误
尝试使用此命令重新安装配置:
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo systemctl start mysql
发生此错误
mariadb.service 的作业失败,因为控制进程已退出并显示错误代码。 有关详细信息,请参阅“systemctl status mariadb.service”和“journalctl -xeu mariadb.service”。
x mariadb.service - MariaDB 10.6.5 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Drop-In: /run/systemd/system/service.d
`-zzz-lxc-service.conf
Active: failed (Result: exit-code) since Sun 2021-12-12 14:23:36 IST; 1h 52min ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 5842 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 5843 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-en>
Process: 5851 ExecStart=/usr/bin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 5851 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Buffer pool(s) load completed at 211212 14:23:36
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '0.0.0.0'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '::'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Aborting
Dec 12 14:23:36 penguin mariadbd[5851]: Warning: Memory not freed: 280
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Failed with result 'exit-code'.
Dec 12 14:23:36 penguin systemd[1]: Failed to start MariaDB 10.6.5 database server.
...skipping...
x mariadb.service - MariaDB 10.6.5 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Drop-In: /run/systemd/system/service.d
`-zzz-lxc-service.conf
Active: failed (Result: exit-code) since Sun 2021-12-12 14:23:36 IST; 1h 52min ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 5842 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 5843 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-en>
Process: 5851 ExecStart=/usr/bin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 5851 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Buffer pool(s) load completed at 211212 14:23:36
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '0.0.0.0'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '::'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Aborting
Dec 12 14:23:36 penguin mariadbd[5851]: Warning: Memory not freed: 280
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Failed with result 'exit-code'.
Dec 12 14:23:36 penguin systemd[1]: Failed to start MariaDB 10.6.5 database server.
[harshpatel990@penguin ~]$ journalctl -xeu mariadb.service
-- The job identifier is 688 and the job result is failed.
Dec 12 13:54:05 penguin systemd[1]: Starting MariaDB 10.6.5 database server...
-- Subject: A start job for unit mariadb.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A start job for unit mariadb.service has begun execution.
--
-- The job identifier is 737.
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] /usr/bin/mariadbd (server 10.6.5-MariaDB) starting as process 5780 ...
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Number of pools: 1
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Using Linux native AIO
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Completed initialization of buffer pool
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: 128 rollback segments are active.
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: 10.6.5 started; log sequence number 33062; transaction id 4
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not load>
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] InnoDB: Buffer pool(s) load completed at 211212 13:54:06
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] Server socket created on IP: '0.0.0.0'.
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [Note] Server socket created on IP: '::'.
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
Dec 12 13:54:06 penguin mariadbd[5780]: 2021-12-12 13:54:06 0 [ERROR] Aborting
Dec 12 13:54:06 penguin mariadbd[5780]: Warning: Memory not freed: 280
Dec 12 13:54:06 penguin systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- An ExecStart= process belonging to unit mariadb.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Dec 12 13:54:06 penguin systemd[1]: mariadb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
Dec 12 13:54:06 penguin systemd[1]: Failed to start MariaDB 10.6.5 database server.
-- Subject: A start job for unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A start job for unit mariadb.service has finished with a failure.
--
-- The job identifier is 737 and the job result is failed.
Dec 12 14:23:35 penguin systemd[1]: Starting MariaDB 10.6.5 database server...
-- Subject: A start job for unit mariadb.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A start job for unit mariadb.service has begun execution.
--
-- The job identifier is 786.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] /usr/bin/mariadbd (server 10.6.5-MariaDB) starting as process 5851 ...
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Number of pools: 1
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Using Linux native AIO
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Completed initialization of buffer pool
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: 128 rollback segments are active.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: 10.6.5 started; log sequence number 33074; transaction id 4
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not load>
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] InnoDB: Buffer pool(s) load completed at 211212 14:23:36
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '0.0.0.0'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [Note] Server socket created on IP: '::'.
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
Dec 12 14:23:36 penguin mariadbd[5851]: 2021-12-12 14:23:36 0 [ERROR] Aborting
Dec 12 14:23:36 penguin mariadbd[5851]: Warning: Memory not freed: 280
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- An ExecStart= process belonging to unit mariadb.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Dec 12 14:23:36 penguin systemd[1]: mariadb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
Dec 12 14:23:36 penguin systemd[1]: Failed to start MariaDB 10.6.5 database server.
-- Subject: A start job for unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A start job for unit mariadb.service has finished with a failure.
--
-- The job identifier is 786 and the job result is failed.
当尝试登录时
mysql -u root -p
输入密码: 错误 2002 (HY000):无法通过套接字“/run/mysqld/mysqld.sock”连接到本地服务器 (111) [1]+ 出口 1 mysqld_safe --skip-grant-tables
我认为你的路径(/var/lib/mysql)是空的或者配置有误
尝试使用此命令重新安装配置:
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql