Mysql On Mac OS: Remove & Install
If you downloaded and installed from .dmg package already, and mightbe sometime it sucks because of some reason like me, i gem install mysql2.
1 Remove mysql from you Mac OS X
1.1 backup your database by mysqldump, of course if you want to.
1.2 stop the database. "sudo mysqladmin shutdown" or from the preference panel.
1.3 remove MySQL binary and configuration files
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
1.4 If MySQL automatically at boot and the system preference panel,
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
rm -rf ~/Library/PreferencePanes/My*
1.5 mac OS keeps track of installed applications by tracking "receipts".
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
Then look for receipts in a different location. Open up /Library/Receipts/InstallHistory.plist, find the entry for MySQL, delete the entry.
One more location: look in /private/var/db/receipts/ and search for mysql in the directory. There should be 2 files, delete them.
2 Install by Homebrew
brew install mysql mkdir -p ~/Library/LaunchAgents
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
mysql.server start
Then if mysql start successfully,
mysql_secure_installation
step by step.
PS: You might get this error:
“ERROR! The server quit without updating PID file”.
1
sudo chmod -R 755 /usr/local/var/mysql
$ rm -Rf /usr/local/var/mysql/Your-Machine-Name.local.err
2
ps aux | grep mysql
Then "kill -9 xxxx" to kill all the progress.
3
mv /etc/my.cnf /etc/my.cnf.old
4
mv /var/lib/mysql/ib_logfile* /root/
May be other reasons, hope this helps.
http://nali.org/remove-mysql-from-mac-os-x-snow-leopord/
http://benjsicam.me/blog/how-to-install-mysql-on-mac-os-x-using-homebrew-tutorial/
http://linuxadministrator.pro/blog/?p=225
Mysql On Mac OS: Remove & Install的更多相关文章
- Installing Apache, PHP, and MySQL on Mac OS X
I have installed Apache, PHP, and MySQL on Mac OS X since Leopard. Each time doing so by hand. Each ...
- Install MySQL on Mac OS X——MAC安装MySQL
很多关于如何安装MySQL的教程已经过时了,或者比必须的步骤复杂得多.这篇教程将展示如何安装MySQL,启动MySQL,以root用户进入MySQL,以及创建删除退出数据库. Step 1: 下载My ...
- mysql on Mac OS
在新买的macbook pro15上安装了mysql,发现2个问题 一个是workbench基本无法正常退出,都要force quit 第二是我正常通过workbench连接后,查看系统log,会发现 ...
- mac os x install redis-3.2.9
下载.解压.重命名并且编译安装Redis~ wget http://download.redis.io/releases/redis-3.2.9.tar.gz ~ tar xzf redis-3.2. ...
- 在Mac OS X中配置Apache + PHP + MySQL 很详细
这是一篇超级详细的配置mac os下面php+mysql+apache的文章.非常详细我的大部分配置就是参考上面的内容的,比如,PHP不能连接数据库,就是改一下默认的php.ini中pdo_mysql ...
- 在Mac OS X下使用Apache、PHP、MySQL、Netbeans、Yii
本文环境: Mac OS X:10.8.4 Apache:2.2.22 PHP:5.3.15 Netbeans:7.3.1 Yii:1.1.14 Mac OS X是内置了Apache服务器的,不过默认 ...
- 【转】在Mac OS X 10.8中配置Apache + PHP + MySQL
CHENYILONG Blog 在Mac OS X 10.8中配置Apache + PHP + MySQL 在Mac OS X 10.8中配置Apache+PHP+MySQL的内容包括: 配置Apac ...
- PHP初步:在Mac OS X Yosemite下搭建Apache+PHP+Mysql
Mac OS X是基于unix的操作系统,很多软件都集成在系统中.所以,对于配置PHP的开发环境相对于windows和Linux更简单. 1. 启动Apache服务器 打开终端(terminal),查 ...
- mac os 上安装mysqldb血泪史
昨天下午在mac上安装mysql-python一直未遂今天查了很多资料终于成功了 最后还是在stackoverflow点击打开链接(好网站啊,一般有什么技术问题在这都能找到)上找到了答案,废话少数: ...
随机推荐
- js 按键
原文:https://www.cnblogs.com/lunlunshiwo/p/8705856.html 上周临近周末休息的时候,一个同事跑过来了,对我说:“阿伦啊,有一个页面出问题了,火狐浏览器所 ...
- DWZ主从表界面唯一性验证(后台验证)(三)
之前的博客介绍了前台自写js来验证主动表的唯一性,除了前台的验证,我也学习了后台的一些判断. 再次介绍一下背景需求: 利用DWZ的主从表结构批量添加课程信息,在提交表单后,触发Action事件 1.是 ...
- maven pom文件详解
http://www.blogjava.net/hellxoul/archive/2013/05/16/399345.html http://blog.csdn.net/houpengfei111/a ...
- node配置自动监测文件改变不重启
方法一: nodemon npm install -g nodemon nodemon ./bin/www 或者在npm start命令里把node改为nodemon 方法二:supervisor n ...
- JWT全面解读、使用步骤
JWT全面解读JWT全面解读前言JWT基本使用在pom.xml引入java-jwt示例如下概念介绍JWT消息构成头部playload标准中注册的声明 (建议但不强制使用)自定义数据签名signatur ...
- jenkins 神奇变量
Hudson自己设置的一些环境变量可用于通过Hudson来执行shell脚本.Windows批处理文件和Ant文件,他们包括 Hudson设置环境变量 当一个Hudson作业执行时,它会设置一些环境变 ...
- YAML简介
YAML Ain’t Markup Language YAML 是一种简洁的非标记语言 YAML以数据为中心,使用空白,缩进,分行组织数据,从而使得表示更加简洁易读 基本规则: 1.大小写敏感 2. ...
- go语言之PLAN9汇编
http://blog.studygolang.com/2013/05/asm_and_plan9_asm/ https://lrita.github.io/2017/12/12/golang-asm ...
- git同时提交到两个仓库
有时候一个项目,希望既提交到oschina又提交到公司内网的gitlab,或者是github什么的. 使用git remote -v 查看当前git的远程仓库. 添加一个远程仓库 git remote ...
- 03-Linux各目录及每个目录的详细介绍
Linux各目录及每个目录的详细介绍 [常见目录说明] 目录 /bin 存放二进制可执行文件(ls,cat,mkdir等),常用命令一般都在这里. /etc 存放系统管理和配置文件 /home 存放所 ...