Mac OS命令行下启动MySQL

Mac OS命令行下启动MySQL

  • Mac OS命令行下启动MySQL
    • 启动服务
    • 登录

1. 启动服务

sudo /usr/local/mysql/support-file/mysql.server start

关闭

sudo /usr/local/mysql/support-file/mysql.server stop

重启

sudo /usr/local/mysql/support-file/mysql.server restart

2. 登录

/usr/local/mysql-5.7.18-macos10.12-x86_64/bin/mysql -uroot -p

你可能感兴趣的:(MySQL,Mac)