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点击打开链接(好网站啊,一般有什么技术问题在这都能找到)上找到了答案,废话少数: ...
随机推荐
- Compile cpp File Manually without IDE under Mingw Environment
环境准备. 安装mingw并设置好系统PATH. mingw.windows下的GUN编程环境. 系统变量的作用--可运行文件的搜索路径. 这样在cmd直接输入g++就能调用到D:\Program F ...
- XML 中可嵌入 cmd命令脚本
原文要参照代码 1. XML解析 Task逻辑块可相互组合,形成复杂的树状结构,其结构用XML表示,即写成XML文件的形式. 样例如下: <!-- 顺序执行块 --> <seq> ...
- cordova开发跨平台应用问题随笔记
iOS下频繁请求地理位置授权 做的某个cordova应用有用到geolocation插件,跑在iOS的时候发现app请求了一次授权,结果webkit还请求了一次授权,不但如此,webkit请求的格式还 ...
- sar监控工具详解
转自http://www.cnblogs.com/Amaranthus/p/3745680.html SAR NAME: SAR报告,收集,保存系统活动信息 语法: sar [ -A ] [ -b ...
- Android四大组件之——ContentProvider(一)
Android四大组件之--ContentProvider(一) 本人邮箱:JohnTsai.Work@gmail.com,欢迎交流讨论. 欢迎转载,转载请注明网址:http://www.cnblog ...
- level 1 -- unit 4 -- where 引导的疑问句
where be sb/sth 询问地点,用where where is the restaurant? where are my socks ? where was tome just now? w ...
- 续:纠正:debian【4】可以安装,而且完美的安装 ! for《Oracle-10.2.0.1,打补丁10.2.0.5:在 debian 版本4【不含4】以上,及 ubuntu 7.04【不含7.04】以上都可以安装!》
关键点: ip a ifconfig -a dhclient ifconfig -a poweroff ip a ifconfig -a apt-get update apt-get install ...
- Three-js 创建第一个3D场景
1.一个场景至少需要的三种类型组件 相机/决定哪些东西将在屏幕上渲染 光源/他们会对材质如何显示,以及生成阴影时材质如何使用产生影响 物体/他们是在相机透视图里主要的渲染队形:方块.球体等 ...
- centos6.5环境 安装php5.5.30的redis扩展 介绍
1.下载软件包 wget http://pecl.php.net/get/redis-2.2.5.tgz 2.解压 tar zxvf redis-2.2.5.tgz 3.进入 ...
- go fmt格式化----“占位符”
https://studygolang.com/articles/2644 https://studygolang.com/static/pkgdoc/pkg/fmt.htm