Mac下MySQL无my.cnf的详细解决步骤
1.进入mysql目录查看是否有相应的配置文件,没有转2,有转3>
查看方法,在访达使用快捷键:command+shift+g,随后在弹窗输入目录(这里是本电脑mysql所在路径): /usr/local/mysql
2.进入终端,自己手动添加配置文件my.cnf
编辑操作参考来源:https://blog.csdn.net/lzh_86/article/details/79450793
配置文件参考来源:https://www.cnblogs.com/liangjiahao713/p/8097942.html
###在终端键入sudo vim /etc/my.cnf ,键入i进入编辑状态,需要验证用户密码,将下方my.cnf粘贴进去,按esc退出编辑状态,按shift+zz保存并退出。
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)