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点击打开链接(好网站啊,一般有什么技术问题在这都能找到)上找到了答案,废话少数: ...
随机推荐
- 浅谈你感兴趣的 CLR GC 机制底层
本文内容是学习CLR.via C#的21章后个人整理,有不足之处欢迎指导. 昨天是1024,coder的节日,我为自己coder之路定下一句准则--保持学习,保持自信,保持谦逊,保持分享,越走越远. ...
- spark 源码阅读博客
http://blog.csdn.net/oopsoom/article/details/38257749
- 原来找字也可以这样用ElseIf FindStr 手机按键精灵 跟大漠的区别
原来找字也可以这样用ElseIf FindStr(646, 1109, 776, 1261, "公告小叉", "FFFFFF-333333", 0.9, in ...
- 前端如何获取http状态码400的返回值
axios.get("/check_mobile_and_sent_code",{withCredentials:true,params:{mobile:formInline.mo ...
- windows server 2003R2\2008R2\2012\2016 安装【故障转移群集】cluster
温故而知新! 靠,突然觉得it技能只要一年的时间就能忘记! virtualbox虚拟机安装群集,注意点: clone的虚拟机,sid问题.sysprep太慢了,不如重新安装快! 虚拟机增强组件,会影响 ...
- SQL2005数据库置疑处理
2005中遇到置疑.丢失日志时按照网上常见的MSSQL2000修复方法来做, 结果发现行不通,甚至连一步都做不下去.其实,在MSSQL2005在处理置疑问题的思 路与MSSQL2000是一致的,但具体 ...
- C语言的结构体
举例,一个结构体的定义如下: typedef struct _foo { ]; int age; int sex; } foo; 对齐 如果直接对上面的结构体作sizeof()运算: printf( ...
- 修改Tomcat的默认访问目录
放在外网的应用,用户多是直接输入域名访问,而Tomcat的默认目录是ROOT,所以我们需要更改其默认目录. 更改Tomcat的默认目录很简单,只需要修改server.xml就可以了. 具体是是在< ...
- WPF布局管理之Canvas、InkCanvas (转)
一.Canvas 在WPF中子元素的绝对定位的布局控件 其子元素使用Width.Height定义元素的宽度和高度 使用Convas.Left(Convas.Right).Convas.Top(Conv ...
- iOS开发-获取子视图坐标系中Point、Rect在父视图坐标系中的实际值
iOS提供了方法来完成上述值得转换 convertRect:toView:, convertRect:FromView: convertPoint:toView: and convertPoint:f ...