本人比较推荐使用homebrew方式安装,省去大多数的麻烦,使用官方dmg方式推荐到官网下载:http://dev.mysql.com/downloads/mysql/
使用homebrew方式
安装:
sudo brew install mysql
启动:
sudo mysql.server start
有可能会遇到下面这个问题:
<span style="color: #000000;">Starting MySQL .. ERROR</span>! The server quit without updating PID file (/usr/local/<span style="color: #0000ff;">var</span>/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 -<span style="color: #000000;">p Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id </span><span style="color: #0000ff;">is</span> <span style="color: #800080;">1</span><span style="color: #000000;"> Server version: </span><span style="color: #800080;">5.6</span>.<span style="color: #800080;">23</span><span style="color: #000000;"> Homebrew Copyright (c) </span><span style="color: #800080;">2000</span>, <span style="color: #800080;">2014</span>, Oracle and/<span style="color: #000000;">or its affiliates. All rights reserved. Oracle </span><span style="color: #0000ff;">is</span> a registered trademark of Oracle Corporation and/<span style="color: #000000;">or its affiliates. Other names may be trademarks of their respective owners. Type </span><span style="color: #800000;">‘</span><span style="color: #800000;">help;</span><span style="color: #800000;">‘</span> or <span style="color: #800000;">‘</span><span style="color: #800000;">h</span><span style="color: #800000;">‘</span> <span style="color: #0000ff;">for</span> help. Type <span style="color: #800000;">‘</span><span style="color: #800000;">c</span><span style="color: #800000;">‘</span><span style="color: #000000;"> to clear the current input statement. mysql</span>>
mysql安装(Mac平台)
标签:
本文系统来源:http://www.cnblogs.com/super-d2/p/4537174.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!