centos 安装mariadb 替代mysql
yum install mariadb-server mariadb
systemctl start mariadb
mysql -uroot -p
默认密码
mysql -uroot -p
mysql_secure_installation 初始化设置
//允许用户testuser从ip为222.129.1.1的主机连接到mysql服务器,并使用testpassword作为密码 MariaDB [(none)]> grant all privileges on *.* to ‘testuser‘@‘222.129.1.1‘ identified by ‘testpassword‘ with grant option; (若是允许所有ip:GRANT ALL PRIVILEGES ON *.* TO ‘testuser’@‘%’ IDENTIFIED BY ‘testpassword’ WITH GRANT OPTION;) MariaDB [(none)]> flush privileges; //刷新权限缓存 MariaDB [(none)]> show privileges; MariaDB [(none)]> show grants for ‘testuser‘@‘222.129.1.1‘ systemctl restart mariadb
相关推荐
Gexrior 2020-10-22
Lostinthewoods 2020-10-29
txt 2020-06-14
azhou 2020-06-12
hungzz 2020-06-11
CharlesYooSky 2020-06-05
aliuge 2020-06-03
URML 2020-05-30
lwwishes 2020-05-29
83173052 2020-05-29
tanyhuan 2020-05-28
muzirigel 2020-05-26
饮马天涯 2020-05-20
aliuge 2020-05-12
83173052 2020-05-10
Mrbianxin 2020-05-07
InJavaWeTrust 2020-05-04