Tag Archives: How to install MariaDB

Debian: How to install MariaDB

    1. 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

    1. 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