Step:- 1. Yum server should be Pre-installed as shown in above post
Step:- 2. To view yum list
#yumlist
Step:- 3. To install Maria-DB Packages
#yum install mariadb mariadb-server mariatest –y
Step:- 4. Make changes in some files
#vim /etc/my.conf
[my_sqld -safe]
skip_networking=1
save and exit
Step:- 5. To start Maria-DB services
#systemctl start mariadb
Step:- 6. To enable Maria-DB services
#systemctl enable maridb
Step:- 7. To check status
#systemctl ststus maridb
Step:- 8. For secure installation Maria-DB
#mysql_secure_installation
Yes or no
8.1. Set root password :Yes
8.2. Remote anonyms :Yes
8.3. Disallow root login :Yes
8.4. Remote test database and access :NO
8.5. Reload privilages table now :Yes
Step:- 9. How do I log in to the Maria-DB server?
Use the mysql command as follows:
$ mysql -u root -p
Step:- 10. How to add database on the Maria-DB server
First, log in as root user:
$ mysql -u root -p mysql
Create a new MariaDB database called test. Type the following command at MariaDB> prompt:
CREATE DATABASE test;
Step:- 11. How to add users on the MariaDB server
Create a new user called kishan for database called test:
GRANT ALL ON test.* TO kishan@localhost IDENTIFIED BY 'secretePasswordHere'
ow to connect to the MariaDB database test using kishan account
# mysql -u kishan -p'secretePasswordHere' test
OR
# mysql -u kishan -p test
Step:- 12. How to start/stop/restart mariadb.service
Again use the following syntax:
#systemctl stop mariadb.service
#systemctl start mariadb.service
# systemctl restart mariadb.service
# systemctl status mariadb.service
Step:- 2. To view yum list
#yumlist
Step:- 3. To install Maria-DB Packages
#yum install mariadb mariadb-server mariatest –y
Step:- 4. Make changes in some files
#vim /etc/my.conf
[my_sqld -safe]
skip_networking=1
save and exit
Step:- 5. To start Maria-DB services
#systemctl start mariadb
Step:- 6. To enable Maria-DB services
#systemctl enable maridb
Step:- 7. To check status
#systemctl ststus maridb
Step:- 8. For secure installation Maria-DB
#mysql_secure_installation
Yes or no
8.1. Set root password :Yes
8.2. Remote anonyms :Yes
8.3. Disallow root login :Yes
8.4. Remote test database and access :NO
8.5. Reload privilages table now :Yes
Step:- 9. How do I log in to the Maria-DB server?
Use the mysql command as follows:
$ mysql -u root -p
Step:- 10. How to add database on the Maria-DB server
First, log in as root user:
$ mysql -u root -p mysql
Create a new MariaDB database called test. Type the following command at MariaDB> prompt:
CREATE DATABASE test;
Step:- 11. How to add users on the MariaDB server
Create a new user called kishan for database called test:
GRANT ALL ON test.* TO kishan@localhost IDENTIFIED BY 'secretePasswordHere'
ow to connect to the MariaDB database test using kishan account
# mysql -u kishan -p'secretePasswordHere' test
OR
# mysql -u kishan -p test
Step:- 12. How to start/stop/restart mariadb.service
Again use the following syntax:
#systemctl stop mariadb.service
#systemctl start mariadb.service
# systemctl restart mariadb.service
# systemctl status mariadb.service
No comments:
Post a Comment