本文记录Ubuntu系统下安装Mysql
1 查看系统信息
lsb_release -a
2 使用apt下载安装Mysql
1 打开终端,首先更新你的系统包索引,以确保所有包都是最新的
sudo apt update
2 安装mysql服务器
sudo apt install mysql-server (也可以选择对应的mysql-server 版本)
3 查看mysql状态
安装完成后
sudo systemctl start mysql //开启
sudo systemctl status mysql //检查状态
sudo systemctl stop mysql //关闭
sudo systemctl restart mysql //重启
4 安全模式设置
运行 mysql_secure_installation
脚本进行安全设置,包括设置 root 密码、删除匿名用户、