我通过自制软件安装了mariadb,以设置wordpress环境。它旨在与laravel代客使用。我当前正在使用zsh shell。
我安装它没有问题(10.3.12),但是当我运行mysql.server start时,出现以下错误:
mysql.server start
Starting MariaDB
.190206 11:26:18 mysqld_safe Logging to '/usr/local/var/mysql/chriss-mbp.lan.err'.
190206 11:26:18 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
/usr/local/bin/mysql.server: line 260: kill: (55179) - No such process
ERROR!
有人可以帮助我缩小为什么我得到此错误的原因吗?我是Terminal和mariadb的新手,所以我希望这只是我不知道的愚蠢错误。
答案 0 :(得分:0)
Brew包括自己的服务经理。通过brew services list
,列出所有已安装的服务。 MariaDB应该在那里。
要启动它,请致电brew services start mariadb
。
答案 1 :(得分:0)
查看启动脚本中有问题的行,此错误表明:
命令名称kill
有点误导;它最常用于杀死进程,但也可以用于发送任意信号,甚至可以将{-0
)发送到check whether it would be possible to send a signal,这就是这里发生的情况。
要找出为什么服务器没有启动,您需要检查错误日志,该日志将在macOS / Homebrew安装的MySQL或MariaDB上:
/usr/local/var/mysql/<hostname>.err
如果您tail
该文件,则应该看到失败的原因,例如
2019-11-01 11:29:14 0 [ERROR] Can't start server: Bind on TCP/IP port.
Got error: 48: Address already in use
2019-11-01 11:29:14 0 [ERROR] Do you already have another mysqld server
running on port: 3306 ?
2019-11-01 11:29:14 0 [ERROR] Aborting
(在我的情况下,我有另一个MariaDB实例在Docker容器中运行并蹲在端口3306上。)
答案 2 :(得分:0)
尝试在日志文件/var/log/mariadb/mariadb.log
中查找错误。
我的配置不存在,最好说尚未导入/配置的时区。
答案 3 :(得分:0)
sudo tail -f /usr/local/var/mysql/[your computer host name].err
2021-01-22 13:16:17 4581617088 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.42-84.2 started; log sequence number 149299467171
2021-01-22 13:16:17 123145364480000 [Note] InnoDB: Dumping buffer pool(s) not yet started
2021-01-22 13:16:17 4581617088 [Note] Plugin 'FEEDBACK' is disabled.
2021-01-22 13:16:17 4581617088 [Note] Recovering after a crash using tc.log
2021-01-22 13:16:17 4581617088 [ERROR] Bad magic header in tc log
2021-01-22 13:16:17 4581617088 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2021-01-22 13:16:17 4581617088 [ERROR] Can't init tc log
2021-01-22 13:16:17 4581617088 [ERROR] Aborting
我在本地运行 MariaDB 10.1 并启动 MariaDB 10.5,不知何故我的 /usr/local/var/mysql/tc.log
受到影响,我必须重命名它以再次启动我的本地 10.1。
sudo mv /usr/local/var/mysql/tc.log /usr/local/var/mysql/tc.log_
sudo mysql.server start
Starting MariaDB
.210122 14:30:56 mysqld_safe Logging to '/usr/local/var/mysql/[your computer host name].err'.
210122 14:30:56 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
SUCCESS!