标签:
mac平台安装mysql有两种方式:
1)使用官方度dmg安装;
2)使用homebrew方式
本人比较推荐使用homebrew方式安装,省去大多数的麻烦,使用官方dmg方式推荐到官网下载:http://dev.mysql.com/downloads/mysql/
安装:
sudo brew install mysql
启动:
sudo mysql.server start
有可能会遇到下面这个问题:
Starting MySQL .. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Joshs-MacBook-Pro.local.pid).
其实就是改下文件权限:
adeMacBook-Pro:~ apple$ sudo chown -R mysql /usr/local/var/mysql/
adeMacBook-Pro:~ apple$ sudo mysql.server start
Starting MySQL
. SUCCESS!
有关这个问题的讨论:
http://stackoverflow.com/questions/12627604/mysql-start-up-issues-error-the-server-quit-without-updating-pid-file
http://stackoverflow.com/questions/4963171/mysql-server-startup-error-the-server-quit-without-updating-pid-file
http://segmentfault.com/a/1190000000438233
登陆并且使用如下:
adeMacBook-Pro:~ apple$ mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.23 Homebrew Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. mysql>
标签:
原文地址:http://www.cnblogs.com/super-d2/p/4537174.html