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-server
sudo 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
start
for starting the serversudo systemctl start mariadb
- Use
stop
For stopping the serversudo systemctl stop mariadb
- Use
restart
For restarting the serversudo systemctl restart mariadb
- Use
status
For 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
localhost
is allowd to connect…CREATE USER 'local_user'@'localhost' IDENTIFIED BY 'password';
Now you can login from
any
IP to yourCREATE USER 'local_user'@'%' IDENTIFIED BY 'password';
This will allow you only to login from
specific
IPCREATE USER 'local_user'@'192.168.1.1' IDENTIFIED BY 'password';
Giving user grant all privileges
Let’s login with our
root
use in MariaDBmysql -u root -p
Replace
syslogine
with your own enw created used and replacelocalhost
if want.GRANT ALL PRIVILEGES ON *.* TO 'syslogine'@'localhost' WITH GRANT OPTION;
Lets save it.
FLUSH PRIVILEGES;
Yes now we can exit the
mysql
exit
Edit MariaDB 50-server.cnf
cd /etc/mysql
LOLLLLLLLLLLLL