Free and Opensource software review, Operating system review, Tips and Tricks, System tweaks, troubleshooting, Tools and Techniques, Hacks

Installing MySQL server in linux

MySQL installation and RunningMySQL is the most widely used and the most popular opensource database management system. MySQL is supported in all operating systems including Linux, windows, Solaris etc. Apart from this high cross platform support, it offers many other advanced features. MySQL stores data in database objects called tables. Each table contains data stored in rows.

Installing MySQL in your local machine will be required to test your web applications (the ones that require database) before publishing it to the web. This article will tell you how to install and run MySQL in your Linux systems.

Installing MySQL

MySQL in Linux can be installed by typing the following command in Linux.

In Fedora and other rpm based systems it can be installed by typing the following command in the terminal.

sudo yum instal mysql

In Ubuntu and other debian based systems it can be installed by typing

sudo apt-get install mysql

in the terminal.

The commands above will install MySQL and MySQL Server in your system. If it doesn’t install  it, you can do it by typing

sudo yum install mysql-server

in rpm based systems and in debian based systems by typing

sudo apt-get install mysql-server

Now you will have MySQL and MySQL-server installed in your Linux system.

The method mentioned above is the easiest way of installing MySQL in your system or you can also follow an optional method by downloading the packages required for your system from the following link

Now you can start MySQL sever in your system.

Starting MySQL

Now you can enable the MySQL services in your system by running the following command.

/sbin/chkconfig mysqld on

and after that you can set the MySQL root password by

mysqladmin -u root password ‘password’

where you will have to type your password inside the quotes.

You can verify if MySQL is running in your system by the following command.

mysqladmin -u root -p status

Now you have successfully installed and strted the MySQL in your system.

, , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *