Debian安装MySQL
1.更新包
sudo apt update
2.安装MySQL的apt配置工具
wget https://dev.mysql.com/get/mysql-apt-config_0.8.32-1_all.deb apt install gnupg dpkg -i mysql-apt-config_0.8.32-1_all.deb apt update
3.安装MySQL,中间会让设置密码
sudo apt install mysql-server
4.启动
sudo systemctl start mysql
5.停止
sudo systemctl stop mysql
6.开机自启动
sudo systemctl enable mysql
7.状态
sudo systemctl status mysql
8.登录
sudo mysql -u root -p
如需设置远程连接请移步此处查看:https://www.cnblogs.com/lyt520/p/18416206
参考原文地址:https://blog.csdn.net/weixin_71993565/article/details/140324756