os x 下 brew install mysql 5.7记录
安装完成后需要修改配置, 设置root密码.方法如下:
- 开启mysql. mysql.server start (停止命令为 mysql.server stop)
- 这一步直接运行 mysql_secure_installation 进行修改. 如果修改不了.则通过
mysql -u root -p 进行执行mysql命令. 删除密码验证插件 UNINSTALL PLUGIN validate_password;
然后再通过 mysql_secure_installation 进行设置root密码.
3 .mysql下查看字符集: show variables like '%char%';
- mysql 下常见的命令.
show databases;
use dbname;
show tables;