我正在尝试让 mariadb 10.3 在全新安装的 ubuntu server 16.04 上运行,该服务器附带 mysql 5.7,因此我首先使用以下命令停止并删除它
sudo service mysql stop
sudo apt-get --purge remove mysql-server
然后通过官方 repo mariadb-server 安装,之后我运行:
sudo mysql_secure_installation
sudo mysql_upgrade
一切似乎都运行正常,但当我重新启动虚拟机时,它就无法启动并显示以下错误:
Job for mariadb.service failed because a timeout was exceeded. See "systemctl status mariadb.service" and "journalctl -xe" for details
系统控制:
[Note] Event Scheduler: Purging the queue. 0 events
[Note] InnoDB: Starting shutdown
[Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
[Note] InnoDB: Shutdown completed; log sequence number 3082519; transaction id 1362
[Note] InnoDB: Removed temporary tablespace data file "ibtmp1"
[Note] /usr/sbin/mysqld: Shutdown complete
Failed to start MariaDB 10.0.3.14 database server.
mariadb.service: Unit entered failed state.
mariadb.service: Failed with result 'timeout'.
日志控制:
ubuntu systemd[1]: mariadb.service: Unit entered failed state.
ubuntu sudo[1432]: pam_unix(sudo:session): session closed for user root
ubuntu systemd[1]: mariadb.service: Failed with result 'timeout'.
我尝试了在网上找到的一些“解决方案”,例如更改 /var/lib/mysql 文件夹的所有权和/或权限或添加一些 my.cnf 配置行,但没有任何效果。
任何想法?