MariaDB The database management system is a branch of MySQL, which is mainly maintained by the open source community and is licensed under GPL. One of the reasons for the development of this branch is that after Oracle acquired MySQL, there is a potential risk of closing MySQL to its source, so the community adopts branching to avoid this risk. MariaDB is fully compatible with mysql, and the usage is the same.
System environment:
CentOS Linux release 8.1.1911 (Core)
1 ) Install mariaDB
2 ) Turn on the service. After the installation is complete, first turn on the MariaDB service and set it to start at boot
systemctl start mariadb #Open service
systemctl enable mariadb #Set as a boot service
3 ) Initial configuration.
mysql_secure_installation
Enter current password forroot(enter for none): #Enter the password of the database super administrator root(Note that the password is not the root of the system), If you have not set a password for the first time, press Enter
Set root password?[Y/n] #Set password, y
New password: #new password
Re-enter newpassword: #Enter the password again
Remove anonymous users?[Y/n] #Remove anonymous users, y
Disallow root login remotely?[Y/n] #Reject root remote login, n, regardless of y/n, will refuse root remote login
Remove test database and access to it?[Y/n] #Delete the test database, y: delete. n: Do not delete, there will be a test database in the database, generally not needed
Reload privilege tables now?[Y/n] #Reload the permission table, y. Or restart the service maybe
4 ) Test whether the login is successful.
mysql -u root -p
5 ) Set MariaDB character set to utf-8
。。。。。。
6 ) Remote link to mariadb database
Enable remote access
grant all on *.* to user03@'%' identified by '123456'with grant option
Force refresh permissions
flush privileges;
Recommended Posts