mac 安装mysql出现一系列问题

lyz12600 2016-03-13 05:27:06
1.在mysql官网下载5.7版本后安装,按照网上的一堆教程折腾半天,就是进不去,5.7的下载之后里边的文件显示与网上的教程都不一样,感觉少了些东西;
2.于是下载mysql5.6,打开mac终端,莫名显示如下(新打开就有,应该是什么地方配置有问题)

Last login: Sun Mar 13 17:10:15 on ttys000
-bash: Setting: command not found
lyzdeMacBook-Air:~ lyz$

3.输入以下,出现这样
lyzdeMacBook-Air:~ lyz$ /usr/local/mysql-5.6.29-osx10.8-x86_64/bin/mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

4.查看my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

[mysqld]

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# datadir = ...
# port = ...
# server_id = ...
# socket = ...

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

5./tmp目录下没有mysql.sock这个文件


大神帮忙看下,该怎么样才能使用mysql
...全文
340 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
lyz12600 2016-03-16
  • 打赏
  • 举报
回复
问题已解决,请参考 http://blog.csdn.net/lyz12600/article/details/50902428
zhu19774279 2016-03-14
  • 打赏
  • 举报
回复
没用过Mac。难道是MySQL没有权限?
lyz12600 2016-03-14
  • 打赏
  • 举报
回复
启动了也没这个文件/tmp/mysql.sock
zhu19774279 2016-03-14
  • 打赏
  • 举报
回复
MySQL没启动。MySQL启动了才会自动生成mysql.sock这个文件。你再找找Mac下如何启动MySQL。
lyz12600 2016-03-14
  • 打赏
  • 举报
回复
错误日志需要在哪里看到?
  • 打赏
  • 举报
回复
你看看错误日志里有报什么错误吗?

56,675

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧