First, install MARIADB database on CENTOS7
A. Installation
Yum-y Install mariadb Mariadb-server
B. Start
Systemctl Start mariadb
C. System on self-booting
Systemctl Enable MARIADB
D. Next mariadb simple configuration (can set the root user's password/remote connection and other information)
Mysql_secure_installation
The above configuration method, design to more configuration items, if you do not need too many configuration settings, can also be mysqladmin simple root password settings to log on locally:
mysqladmin-uroot-p password ' 1q2w3e '
The initial root password is empty and the root password is set to 1q2w3e. You can then log on locally mysql-uroot-p1q2w3e.
modifying character sets
Vim/etc/my.conf
[Mysqld]
Datadir=/var/lib/mysql
Socket=/var/lib/mysql/mysql.sock
Character-set-server=utf8
Collation-server=utf8_bin
Second, unload mariadb database on Centos7
A. Query the installed MARIADB components:
[Email protected] logs]# Rpm-qa | grep maria*
Mariadb-server-5.5.49-1.el7.centos.x86_64
Mariadb-common-5.5.49-1.el7.centos.x86_64
Mariadb-client-5.5.49-1.el7.centos.x86_64
B. Unmount the database:
[Email protected] logs]# yum-y Remove mari*
C. Delete the database file:
[Email protected] logs]# rm-rf/var/lib/mysql/*
Third, set up MARIADB database remote connection
First, configure the user to allow access, in an authorized manner to the user rights
1 GRANT all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;
Description: Root is the user logging into the database, 123456 is the password to log in the database, * means that any source of any host, anyway, is the right to a large appearance.
Finally, you should not forget to make the refresh effective after you configure the permissions:
1 flush privileges;
Once again the visit is ready;
CentOS7 database installation and configuration other essentials: https://www.cnblogs.com/starof/p/4680083.html
MARIADB installation, uninstallation, and related settings (Linux server MySQL deployment)