[英]Mysql not working on mac Sierra after upgrading php
I recently upgraded my laravel valet to version 2 which installed php 7.2 through brew. 我最近将laravel代客升级到了版本2,该版本通过brew安装了php 7.2。 I had previously been on php 7.1.
我以前使用过php 7.1。 I ran into a few bumps but got php and valet working but once I did I noticed mysql is no longer working.
我遇到了一些麻烦,但是php和valet正常工作,但是一旦我发现mysql不再有效。 If I do brew services start mysql it shows successful but if I type
mysql -v
I get the following error message. 如果我做brew服务,则启动mysql会显示成功,但是如果键入
mysql -v
则会收到以下错误消息。 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
If I type mysql.server start
I get the following error message 如果我键入
mysql.server start
我得到以下错误信息
./usr/local/Cellar/mysql/8.0.17_1/bin/mysqld_safe: line 674: /Users/swany/.valet/Log/mysql.log: No such file or directory
2019-09-11T17:24:54.6NZ mysqld_safe error: log-error set to '/Users/swany/.valet/Log/mysql.log', however file don't exists. Create writable for user 'mysql'.
/usr/local/Cellar/mysql/8.0.17_1/bin/mysqld_safe: line 144: /Users/swany/.valet/Log/mysql.log: No such file or directory
ERROR! The server quit without updating PID file (/usr/local/var/mysql/Chriss-MacBook-Pro-2.local.pid).
I have seen others with similar issues but when i walked through some of the solutions they didn't seem to work for me. 我见过其他人也遇到类似的问题,但是当我浏览一些解决方案时,它们似乎并不适合我。 I am hoping to be able to save all my databases I already have when mysql was running.
我希望能够保存我在mysql运行时已经拥有的所有数据库。 I didn't try to upgrade mysql but it may tried as part of the valet upgrade.
我没有尝试升级mysql,但是它可能是代客升级的一部分。
Check to see if there is a mysql process still running. 检查是否还有mysql进程仍在运行。 Run the following command:
运行以下命令:
ps aux | grep -i mysql
If you see any processes running then kill them using the 如果看到任何进程在运行,请使用
kill -9 PID
Where PID = Process ID of the MySQL process. 其中PID = MySQL进程的进程ID。
After the processes have been terminated, try restarting mysql and see if this solved your problem. 进程终止后,尝试重新启动mysql,看看是否能解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.