Mac安装MySQL

来源:互联网 发布:因windows system32 编辑:程序博客网 时间:2024/05/16 03:30

Mysql安装


安装后进入 系统偏好设置进行启动 


编辑  /etc/bashrc   

添加   export   PATH=$PATH:/usr/local/mysql/bin

source /etc/bashrc


cp  /usr/local/mysql/support-file/my-default.cnf  /etc/my.cnf


如果密码忘了,编辑my.cnf 添加

skip-grant-tables一行


进入mysql以后


update user  set authentication_string=PASSWORD(‘new password’)  where  user=‘root’;

(还有一个命令类似flush  privileges,请自行搜索)


5.7版本的mysql   password属性改为authentication_string

0 0