Since the latest version of linux system, the default is Mariadb instead of mysql!
Installation using the system's own repos is simple:
1. Installation
yum install mariadb mariadb-server
systemctl start mariadb ==> 启动mariadb
systemctl enable mariadb ==> boot self-start
mysql_secure_installation ==> set root password, etc.
mysql -uroot -p123456 ==> Test login!
end!
2. Authorize remote access
first change table
update user set host='%' where user = 'root';
select host,user from user;
second authorization
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; grant access to all hosts
FLUSH PRIVILEGES; save changes
exit; exit