-
- command
apt install mariadb-server
sudo apt purge autoremove
No account password is required for local login, and IP / etc / MySQL can be remotely connected/ mariadb.conf . D directory, comment out this line or IP change
instead
-
- change the password of root
update mysql.user set password=password('ChinaSkill20!') where user='root';
flush privileges;
Create a remote user and set a password
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
flush privileges;
UNIX socket authentication is used by default. Some phpMyAdmin will have “access denied” error when logging in. We can use native MySQL authentication
update mysql.user set plugin = 'mysql_native_password' where User='root';
flush privileges;
restart
systemctl restart mariadb