MAMP mysql not starting

荒凉一梦 提交于 2019-12-25 18:01:12

问题


Got error: 2002: Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) when trying to connect 150629 15:44:35 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql 150629 15:44:35 [Warning] You have forced lower_case_table_names to 0 through a command-line option, even though your file system '/Applications/MAMP/db/mysql/' is case insensitive. This means that you can corrupt a MyISAM table by accessing it with different cases. You should consider changing lower_case_table_names to 1 or 2 150629 15:44:35 [Note] Plugin 'FEDERATED' is disabled. 150629 15:44:35 [Note] Plugin 'ndbcluster' is disabled. /Applications/MAMP/Library/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13) 150629 15:44:35 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 150629 15:44:35 InnoDB: Started; log sequence number 1 402900962 150629 15:44:35 [ERROR] /Applications/MAMP/Library/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 150629 15:44:35 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13) 150629 15:44:35 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended

I can't find mysql.sock file anywhere. This is MAMP 1.9 on OS X version 10.8.5


回答1:


The first thing to try is to change the ownership of the datadir of MySQL, for example, if you run MySQL with user mysql:

chown -R mysql:mysql /path/to/datadir

check the privilges of /Applications/MAMP/tmp/mysql/ directory for creating socket.



来源:https://stackoverflow.com/questions/31116137/mamp-mysql-not-starting

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!