我正在尝试设置 MariaDB,但不知道哪里出了问题
安装流程
我执行了以下命令:
sudo apt update
sudo apt install mariadb-server
sudo mysql_secure_installation
但根本不起作用
错误⛔
第一个错误
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
所以我尝试启动服务器第二个错误
● mariadb.service - MariaDB 10.3.34 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2022-08-08 11:41:57 IDT; 13min ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 4674 (code=exited, status=1/FAILURE)
Aug 08 11:41:57 Server-3 systemd[1]: Starting MariaDB 10.3.34 database server...
Aug 08 11:41:57 Server-3 sh[4671]: [108B blob data]
Aug 08 11:41:57 Server-3 sh[4671]: Fatal error in defaults handling. Program aborted
Aug 08 11:41:57 Server-3 mysqld[4674]: [98B blob data]
Aug 08 11:41:57 Server-3 mysqld[4674]: Fatal error in defaults handling. Program aborted
Aug 08 11:41:57 Server-3 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Aug 08 11:41:57 Server-3 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Aug 08 11:41:57 Server-3 systemd[1]: Failed to start MariaDB 10.3.34 database server.