sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
After I’ve been searching alot I finally mananged it to delete MySQL from my Macbook pro.
The steps:
First you need to edit the file in: /etc/hostconfig and remove the line
Since this is a system file I advise you to open it with nano in terminal:
引用
Open Terminal
sudo nano /etc/hostconfig
Enter your password if you’re not authed yet.
Delete the following line: “MYSQLCOM=-YES-”
CTRL+X (This is the command for closing NANO, Enter the “Y” key to save the file and exit nano).
Second step:
Make sure MySQL is not running.
Open Terminal and copy and paste and run the following commands:
引用
2)#login mysql
mysql -uroot
#show all database
show databases;
#login system user database
use mysql
1.添加用户
GRANT ALL PRIVILEGES ON *.* TO 'build'@'localhost' IDENTIFIED BY 'build' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'build'@'%' IDENTIFIED BY 'build' WITH GRANT OPTION;
2.删除用户 :
mysql>delete from mysql.user where user ='website' ;
mysql>flush privileges; (刷新系统权限表)
3.修改密码
set password for build@localhost = password('build');
3)OS X 系统安装的mysql默认是不用my.cnf配置文件的,仅是使用默认的数据库配置值。
如要进行数据库定制,可到'/usr/local/mysql/support-files/'文件夹底下,把里面的任一个.cnf配置文件复制到/etc/目录底下并修改文件名称为my.cnf。
不过MAC OS X 系统的mysql确实不需要my.cnf来进行配置就已经足够可以使你满意运行了。