How to install MariaDB on Ubuntu
MariaDB database management system is a branch of MySQL, mainly by the open-source community in the maintenance, using GPL license. MariaDB is designed to be fully compatible with MySQL, including API and command line.
This post describes the installation of MariaDB on Ubuntu, although it is quite simple.
sudo apt install mariadb-server mariadb-client
-
add a user with a full set of rights;
-
add root password and log in the ability to the user.
User Adds
mariadb
CREATE USER ‘ddos’@’localhost’ IDENTIFIED BY ‘Dvs@$)$’;
Parameter:
- Username: ddos
- Password: Dvs@$)$
GRANT ALL PRIVILEGES ON *.* TO ‘ddos’@’localhost’;
FLUSH PRIVILEGES;
Exit the console client:
EXIT;
Add a password for the root user
mysql_secure_installation
Enter current password for root (enter for none):
Set root password? [Y/n]
Remove anonymous users? [Y/n]
Disallow root login remotely? [Y/n]
Remove test database and access to it? [Y/n]
Reload privilege tables now? [Y/n]
mariadb
use mysql;UPDATE `user` SET `plugin` = NULL WHERE `user`.`Host` = ‘localhost’ AND `user`.`User` = ‘root’;
FLUSH PRIVILEGES;
EXIT;