MySQL常用指令
-
安装MySQL数据库:
brew install mysql -
删除MySQL数据库:
brew remove mysql
brew cleanup -
启动数据库服务(To have launchd start mysql now and restart at login):
brew services start mysql -
启动数据库服务(if you don't want/need a background service you can just run):
mysql.server start -
暂停数据库服务:
brew services stop mysql -
重新启动数据库服务
brew services restart mysql -
设置数据库初始密码
mysql_secure_installation -
登陆数据库
mysql -uroot
网友评论