安装MySQL:
- 更新系统软件包:
sudo apt-get
- 安装MySQL:
sudo apt-get install mysql-server
配置MySQL:
- 启动MySQL服务:
sudo service mysql start
- 设置root密码:
sudo mysql -u root -p
- 创建新用户:
GRANT ALL PRIVILEGES ON *.* TO '新用户名'@'%' IDENTIFIED BY '密码';
- 刷新权限:
FLUSH PRIVILEGES;
- 退出MySQL:
exit
暂无评论