Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Howto Install MySQL on Linux

This document describes the steps on how to install Mysql on Linux system.Also gives you infomation on few commands which will help to check/identify if the package is already installed r not. Lets start by listing the installed packages in the system. rpm !qa "!qa stands for query all# is the command which will list all the installed packages in the system. $ince it will list the enitre list which is complicated to identify % &e will use grep to sort only the things we want. 'or ex((! rpm !qa )grep !i mysql

* see only one lib file installed. $o lets go ahead and install the mysql using +yum,

$ay +y, to install. The yum will start downloading the pacages through repository ...

-nce the installation is completed. .ou can go ahead and start the service. /ut before that you need to make sure that all the dependency packages are installed which will support the mysql to run without hurdels. $o run yum install mysql0 !y and wait till all the related packages are downloaded and installed.

1ow lets start the mysql service. /etc/init.d/mysqld start

.ou would see a message in the prompt saying(! 2L3A$3 43M3M/34 T- $3T A 2A$$&-45 '-4 T63 My$7L root 8$34 9 To do so% start the server% then issue the following commands(

/usr/bin/mysqladmin !u root password :new!password: /usr/bin/mysqladmin !u root !h localhost.localdomain password :new!password: Alternatively you can run( /usr/bin/mysql;secure;installation $o lets go ahead and reset the password for root to keep it secure. 4un the given command... /usr/bin/mysql;secure;installation

$et the password and remove anonymous users account.

*t is always recommended to disable the root login remotely so say yes and remove the test database. -nce done reload the privilege tables now ...

1ow check the version of mysql by passing the command mysql !<

=onnect to the My$7L database using the root user and make sure the connection is successfull. =ommand(! mysql !u root !p

.ou have sucessfully installed mysql server. (# 'ew commands to manage the service. chkconfig mysqld on " To make it persistant # /etc/init.d/mysql status "to check the status of the service#

/etc/init.d/mysql stop "to stop the service# /etc/init.d/mysql start "to start the service# This document is for beginners on how to install mysql service.. 6appy 3xploring (# <adira> ?oish <adira>>r@ABgmail.com

You might also like