📜  mac 安装 mysql 代码示例

📅  最后修改于: 2022-03-11 15:05:18.145000             🧑  作者: Mango

代码示例2
brew install mysql

sudo chown -R _mysql:mysql /usr/local/var/mysql
sudo mysql.server start

sudo mysql
// set password for root user, or change root to another user
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;

exit
mysql -u root -p