- 安装
$ brew install mysql;
- 首次登陆设定密码
1.1
$ mysql
1.2
mysql>set Password=Password(‘123456’);
or
mysql> update mysql.user set authentication_string=password(“123456”) where user=”root”;
finally
mysql>quit;
- 再次登陆with刚刚设定的密码
$ mysql -u root -p
Enter password:
- 添加新用户并且设定所有权限
mysql> create user ‘test’@’%’ identified by ‘1234’;
mysql> grant all privileges on . to test;
mysql> flush privileges;
mysql 安装和root 默认密码
最新推荐文章于 2023-11-14 09:12:56 发布