当前位置:Gxlcms > 数据库问题 > mysql安装(Mac平台)

mysql安装(Mac平台)

时间:2021-07-01 10:21:17 帮助过:7人阅读

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

使用homebrew方式

安装:

  1. sudo brew install mysql

启动:

  1. sudo mysql.server start

有可能会遇到下面这个问题:

  1. <span style="color: #000000;">Starting MySQL
  2. .. 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

登陆并且使用如下:

  1. adeMacBook-Pro:~ apple$ mysql -uroot -<span style="color: #000000;">p
  2. Enter password:
  3. Welcome to the MySQL monitor. Commands end with ; or \g.
  4. Your MySQL connection id </span><span style="color: #0000ff;">is</span> <span style="color: #800080;">1</span><span style="color: #000000;">
  5. Server version: </span><span style="color: #800080;">5.6</span>.<span style="color: #800080;">23</span><span style="color: #000000;"> Homebrew
  6. 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.
  7. Oracle </span><span style="color: #0000ff;">is</span> a registered trademark of Oracle Corporation and/<span style="color: #000000;">or its
  8. affiliates. Other names may be trademarks of their respective
  9. owners.
  10. 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.
  11. mysql</span>>

 

mysql安装(Mac平台)

标签:

人气教程排行