mac 安装mysql出现一系列问题
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