mac os 启动mysql失败 ERROR 2002 HY000
bogon:~ ksoul$ /Library/StartupItems/MySQLCOM/MySQLCOM restart
Restarting MySQL database server
bogon:~ ksoul$
bogon:~ ksoul$ mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
通过mysql官网下载的 mysql-5.6.24-osx10.9-x86_64.dmg 双击下一步安装,但启动成功,但一运行就报错。系统是MacBook Air os 10.10.2
补充:
在sg抄了一个配置复制到
/usr/local/mysql/my.cnf
中可以了,不过奇怪的事。phpmyadmin中链接地址必须用
127.0.0.1
。
[client]
port = 3306
socket = /tmp/mysql.socket
default-character-set = utf8
[mysqld]
collation-server = utf8_unicode_ci
character-set-server = utf8
init-connect = 'SET NAMES utf8'
max_allowed_packet = 64M
bind-address = 127.0.0.1
port = 3306
socket = /tmp/mysql.sock
innodb_file_per_table = 1
[mysqld_safe]
timezone = '+0:00'
石更不起来君
9 years, 8 months ago