标签:
下载mysql-5.7.14-osx10.11-x86_64.tar
# 移动解压后的二进制包到安装目录
sudo mv mysql-5.6.24-osx10.9-x86_64 /usr/local/mysql
# 更改 mysql 安装目录所属用户与用户组
cd /usr/local
sudo chown -R root:wheel mysql
cd /usr/local/mysql
sudo bin/mysqld --initialize --user=mysql
cd /usr/local/mysql
# 启动
sudo support-files/mysql.server start
# 重启
sudo support-files/mysql.server restart
# 停止
sudo support-files/mysql.server stop
# 检查 MySQL 运行状态
sudo support-files/mysql.server status
# 需要 MySQL 在运行状态执行
cd /usr/local/mysql/bin
./mysqladmin -u root password <your-password>
cd /usr/local/mysql/bin
./mysql -u root -p
<your-password>
标签:
原文地址:http://www.cnblogs.com/ld-swust/p/5816063.html