mac 安装mysql出现一系列问题

MySql 码拜 8年前 (2016-02-10) 1192次浏览
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
解决方案

20

MySQL没启动。MySQL启动了才会自动生成mysql.sock这个文件。你再找找Mac下怎么样启动MySQL。

10

没用过Mac。莫非是MySQL没有权限?

10

你看看错误日志里有报什么错误吗?

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明mac 安装mysql出现一系列问题
喜欢 (0)
[1034331897@qq.com]
分享 (0)