网上很多都不好用,所以特发了一篇教程.
Mac下mysql是没有my.ini文件的,这是windows的配置文件.Mac下的配置文件为my.cnf.需要我们在/private/etc/下手动创建
1.进入/etc/文件夹
cd /etc/
2.通过vim按i进入insert模式编辑my.cnf
sudo vim my.cnf
3.复制下列代码,按esc,输入:wq保存即可
或者可以直接创建一个my.cnf文件,复制下列代码,保存以后
右键Finder前往/private/etc/下,将my.cnf文件复制过去
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/do