问题 在 Mac 上通过 brew install mysql 安装的的MySQL使用基本MySQL命令重启会失败: mysql.server stop mysql.server start mysql.server restart 输出显示会提示成功,但是使用的时候会报错,不能使用. ERROR 2002 (HY000): Can not connect to local MySQL server through socket '/tmp/mysql.sock' (2) 解决方法 启动使用My…
1.安装mysql #brew install mysql 报错 Error: The following directories are not writable by your user: /usr/local/lib You should change the ownership of these directories to your user. sudo chown -R $(whoami) /usr/local/lib 意思是 您应该将这些目录的所有权更改为您的用户 执行以下命令设置…
一.打开mac控制台 $ brew install mysql 二.启动mysql服务 $ mysql.server start 三.初始化mysql配置 1 rainMacBook-Pro:~ comet$ mysql_secure_installation 2 3 Securing the MySQL server deployment. 4 5 Connecting to MySQL using a blank password. 6 7 VALIDATE PASSWORD PLUGIN…