1.安装mariaDB
1.更新源或者替换源
apt-get update
2.安装
apt-get install mariadb-server
启动和停止
service mysql start 或/etc/init.d/mysql start —启动
service mysql stop或/etc/init.d/mysql stop —停止
service mysql restart —重启
service mysql status —查看状态
3.启动mysql
service mysql start
4.设置密码
mysql_secure_installation
5.修改vim /etc/mysql/mariadb.conf.d/50-server.cnf文件中的bind-address = 127.0.0.1
配置,改为0.0.0.0
如下
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0