MacBook 使用 brew 安装 MySQL
(1)准备工作
1.1 更新 brew
更新Homebrew的库:
brew update
(2)正式安装
2.1 安装MySQL:
brew install mysql
2.2 启动mysql
brew services start mysql
(3)初始化数据库
官方建议刚安装好数据库的时候都要初始化数据,因为这样数据库会更加安全
mysql_secure_installation
3.1 选择验证密码组件
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?
Press y|Y for Yes, any other key for No: y
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}">
评论记录:
回复评论: