Connect with us

Hi, what are you looking for?


How to Install MySQL Database Server on CentOS 7

What is MySQL Database Server?

MySQL database server MySQL is a RDBMS that is stand for relational database management system.MySQL has more than 11 million installations. The program runs as a server providing multi-user access to a number of databases and most advanced updated SQL features.

MySQL Quick Snapshots

  • mysqld – the MySQL server
  • mysql – the MySQL command-line tool

Installation of MySQL Database Server on CentOS/RHEL/Scientific/Oracle Linux 7/6/5

Step-I (Installation of MySQL & MySQL Server)
# yum install mysql-server mysql
Step-II (Configure MySQL Configuration Files)
# vi /etc/my.cnf
Step-III (Starting of mysqld daemon)
on normal mode
# /etc/init.d/mysqld start
on safe mode
# cd /usr
# /usr/bin/mysqld_safe &
Step-IV (Test the MySQL daemon with the benchmarks in the ‘sql-bench’ directory)
# cd sql-bench
# perl run-all-tests
Step-V (Set a mysqladmin root password)
# /usr/bin/mysqladmin -u root password 'new-password'
# /usr/bin/mysqladmin -u root -h password 'new-password'
Step-VI (Check MySQL Address)
# netstat -anp |grep mysql
# ps -ef |grep mysql
Step-VII (Starting of MySQL Shell)
As a normal user
# mysql
Enter password:
As a root user
# mysql -u root -p
Enter password:
Step-VIII (Remove MySQL Password)
# /etc/init.d/mysqld stop
# mysqld_safe --skip-grant-tables &
# mysql
mysql> use mysql;
mysql> update user set Password= ‘ ’ where User=‘root’;
mysql> commit;
mysql> flush privileges;
mysql> quit;
# /etc/init.d/mysqld restart
# mysql
Step-IX (See the MySQL Database)
mysql> show databases;
Step-X (Change the MySQL Database)
mysql> use mysql;
Database changed
Step-XI (See the MySQL Database Table)
mysql> show tables;
Step-XII (See the MySQL Database Function)
mysql> describe func;
Step-XIII (User Queries in MySQL Database)
mysql> select * from user
mysql> select Host,User,Password from user;
mysql> select Host,User,Password from user where user='root';
Step-XIV (Create a MySQL Database)
mysql> create database techbrown_db;
Step-XV (Create a MySQL Database Table)
mysql> use techbrown_db;
Database changed
mysql> create table techbrown_table(name VARCHAR(15),email VARCHAR(15),phone_number INT,ID INT NOT NULL AUTO_INCREMENT,primary key(ID));
mysql> show tables ;
Step-XVI (Inserting Information into MySQL Database)
mysql> select * from techbrown_table;
mysql> insert into techbrown_table (name,email,phone_number)values("TechBrown","",0123456789);
mysql> select * from techbrown_table;
Step-XVII (Deleting Information into MySQL Database)
mysql> delete from techbrown_table where phone_number=0123456789;
mysql> select * from techbrown_table;
Step-XVIII (Exit from MySQL Shell)
mysql> exit

Congratulation now you have completed MySQL Database Server Configurations.


You May Also Like


How to auto upgrade JioFi firmware for JioFi 2 / JioFi 3 / JioFi 4 / JioFi 5 / JioFi 6 and other JioFi...


Internet is the most important public network for connecting to the WEB. For internet connection requirement the ISP is required as well as it...


How to download and install the Mobile Intel 4 Series Express Chipset Graphics Drivers for Windows 10.  Windows 10 is the one of the...


How to Install and Configure PCSX2 on Windows 10. The Windows 10 is the most recommended operating system for the Games. In stream platform...