1. 使用命令 apt install mariadb-server
2.启动 mariadb,systemctl start mariadb
3.安全设置,mariadb-secure-installation
4.登录mariadb,mysql -u root
4.远程登录:use mysql;
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
flush privileges;
5./etc/mysql/mariadb.conf.d/50-server.cnf更新IP绑定配置,0.0.0.0
配置最大连接数。
6.查看最大连接数, show variables like 'max_connections';