Cutsom install mariaDB
Cutsom install for mariaDB on Ubuntu server or desktop
Categories:
Custom tutorial for MariaDB on Ubuntu.
Step 1
- Before we begin we need to update our apt packages with
sudo apt updates - After we updates our packages we can install
mariadb-serversudo apt install mariadb-server - Now MariaDB server is installed we can check if it’s running
sudo systemctl status mariadb
Step 2
- Now we need to secure our MariaDB so type
sudo mysql_secure_installation - It will start with asking for root password for mariadb, just press
enter
Common commands
- Use
startfor starting the serversudo systemctl start mariadb - Use
stopFor stopping the serversudo systemctl stop mariadb - Use
restartFor restarting the serversudo systemctl restart mariadb - Use
statusFor checking te status of serversudo systemctl status mariadb
Next
Now we going to configure the mariadb server and securing it by the following steps
sudo mysql_secure_installation
BE NOTED THIS WILL BE FIXED SOME TIME… BUT NOW NOW
examples for localhost, %, specific
Only
localhostis allowd to connect…CREATE USER 'local_user'@'localhost' IDENTIFIED BY 'password';Now you can login from
anyIP to yourCREATE USER 'local_user'@'%' IDENTIFIED BY 'password';This will allow you only to login from
specificIPCREATE USER 'local_user'@'192.168.1.1' IDENTIFIED BY 'password';
Giving user grant all privileges
Let’s login with our
rootuse in MariaDBmysql -u root -pReplace
sysloginewith your own enw created used and replacelocalhostif want.GRANT ALL PRIVILEGES ON *.* TO 'syslogine'@'localhost' WITH GRANT OPTION;Lets save it.
FLUSH PRIVILEGES;Yes now we can exit the
mysqlexit
Edit MariaDB 50-server.cnf
cd /etc/mysql
LOLLLLLLLLLLLL