码迷,mamicode.com
首页 > 数据库 > 详细

mysql安装(Mac平台)

时间:2015-05-28 22:59:37      阅读:379      评论:0      收藏:0      [点我收藏+]

标签:

mac平台安装mysql有两种方式:

1)使用官方度dmg安装;

2)使用homebrew方式

本人比较推荐使用homebrew方式安装,省去大多数的麻烦,使用官方dmg方式推荐到官网下载:http://dev.mysql.com/downloads/mysql/

使用homebrew方式

安装:

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> 

 

mysql安装(Mac平台)

标签:

原文地址:http://www.cnblogs.com/super-d2/p/4537174.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!