安装步骤
apt-get install mariadb-client
apt-get install mariadb-server
配置文件
vi /etc/mysql/my.cnf
[client-server]
default-character-set=utf8
port = 3306
socket = /tmp/mysql.sock
[mysql]
default-character-set=utf8
[mysqld]
basedir=/usr/local/mysql/
datadir=/usr/local/mysql/data/mysql
#character-set-server=utf8
编辑完记得保存,esc,:wq!,回车
图片.png
设置开机自启
systemctl enable mysql
设置开机不启动
systemctl diable mysql
网友评论