Installation of MySQL Sever in Ubuntu using Generic Binaries

Share via:

Installation of MySQL Sever in Ubuntu using Generic Binaries.

To begin the Installation process first download the generic binary from or use the below link for downloading MySQL Sever Software

Link to Download Binaries:

Steps to Configure MySQL Server:

Create a group with name mysql  in linux all the users belongs to a particular group and every user has a single primary group and can participate in multiple secondary groups  and also create a user by the below is the commands

This is common place to install any software


Once you copy the software to the above directory the software is a compressed file so uncompress using below command

After uncompressing a directory gets created so just rename it with mysql for convenience

Now execute the file called mysql_install_db which is present in the scripts directory as mysql user which installs mysql software

After installing the software we need to initialize the mysqld process which will not be running once the installation has done

Now copy the mysql.server file from /usr/local/mysql/support-files directory  to /etc/init.d directory for starting the mysql server automatically once the server has rebooted other wise we need to run the command bin/mysqld_safe –user=mysql & always when server has rebooted

All the client and non client programs are stored in the bin directory of the mysql software location

Connecting to MySQL Server using client program

This is the program which connects to the mysql server

Now you can see mysql prompt from where you can access the MySQL server

The above command will display the no of databases

The above command is to find out the current database directory

The above command is to switch the database to mysql database

It will display all the tables of the current database

To find out the users in the current database

Setting the password for the root user:

By default the root user in mysql will not have password to create it we need to run a script called mysql_secure_installation which is present in bin directory of MySQL software location

Before that set the PATH environment variable so that you can execute any programs in bin from any location

Now copy the my-default.cnf file from from mysql/support-files directory into /etc directory with name my.cnf which contains crucial information about MySQL Server

Then execute the file mysql_secure_installation for removing the anonymous users and databases and setting the password for the root user after running the  mysql_secure_installation it asks the current user password so by default it is blank so hit enter then specify the password after setting the password it reloads the privilege table It removes the anonymous users because to restrict the access by other users and also we can disable the remote login for root user for secure connection

Once after setting the password for root user any user is executing mysql program required to specify username and password for connecting MySQL Server

now the anonymous database test will also gets removed


Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates

KTEXPERTS is always active on below social media platforms.

Facebook :
LinkedIn :
Twitter :
YouTube :
Instagram :

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (7 votes, average: 5.00 out of 5)

Add Comment