dalang
2013-01-28 19:08:52 +08:00
刚接触mac,也像LZ一样不熟悉,所以选择通过homebrew的方法安装mysql。遇到的问题跟LZ一模一样,后来发现需要sudo vi /etc/my.cnf,并写入
[mysqld]
datadir=/usr/local/var/mysql/mysql
socket=/usr/local/var/mysql/mysql.sock
character-set-server=utf8
max_allowed_packet=8M
#This option makes InnoDB to store each created table into its own .ibd file.
innodb_file_per_table
[mysql]
default-character-set=utf8
[client]
socket=/usr/local/var/mysql/mysql.sock
之后再按照brew info mysql的说明执行就能success了。