admin avatar

debian 10安装MySQL服务器记录

🕜 by admin





到MySQL官网下载apt安装源 https://dev.mysql.com/downloads/repo/apt/

1
2
wget https://repo.mysql.com//mysql-apt-config_0.8.15-1_all.deb
apt install ./mysql-apt-config_0.8.15-1_all.deb

下面开始安装MySQL服务器

apt-get update apt install mysql-server

安装过程需要交互,比如输入MySQL版本,MySQL密码等等。。。

这里不再描述,自行根据实际情况安装

systemctl start mysql

启动MySQL服务器

systemctl status mysql

查看MySQL服务器状态

1
2
3
4
5
6
7
8
9
10
11
12
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2020-03-30 20:36:44 CST; 16min ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 3198 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 3233 (mysqld)
   Status: "Server is operational"
    Tasks: 38 (limit: 2281)
   Memory: 388.6M
   CGroup: /system.slice/mysql.service
           └─3233 /usr/sbin/mysqld

如果MySQL是对外提供服务的,建议执行以下命令设置MySQL安全性

mysql_secure_installation





💘 相关文章





写一条评论

Based on Golang + fastHTTP + sdb | go1.18.1 Processed in 2ms