统信UOS 安装配置MariaDB

1.开启终端,切换root用户 sudo su
2.sudo apt-get install mariadb-server
3.sudo mysql_install_db
4.cd /etc/mysql/mariadb.conf.d
5.vim 50-server.conf
修改入下:
添加的东西,
skip-external-locking
skip-name-resolve
lower_case_table_names =1
统信UOS 安装配置MariaDB_第1张图片6.service mysql restart
7.添加用户 用户名:zara 密码:zara123

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON TUTORIALS.* TO 'zara'@'localhost' IDENTIFIED BY 'zara123';

如果要想所有的外部ip地址都能够访问使用MariaDB,可以执行下面:

GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
flush privileges;

如果要查看用户的权限,可以执行:

show grants for 'root'@192.168.XX.XX

你可能感兴趣的:(linux)