Install MYSQL on REDHAT
1 . First of all Install the sql rpm package.
#rmp -ivh sql-3.3.6.2
2. Start the mysql service
# chkconfig mysql start
# service mysqld start
3. Try to login as following command
# mysql -u root -p
It will prompt for password, click enter.
If everything works fine, it will directly take to sql prompt.
mysql>
4.You can setup a password for root user
# mysqladmin -u root password “TYPE NEW PASSWORD”
5. Now try to login using that password
# mysql -u root -p
Enter the password: TYPE NEW PASSWORD.
IT wil directly take you to mysql prompt
mysql>
Errors:
1 . We you run the command # mysql -u root -p
It will prompt for the password, we you type enter it will give following error message:
Can’t connect to local MySQL server through socket ‘/var/lib /mysql/mysql.sock’ (2)
You have to perform following steps.
# service mysqld stop.
# ln -s /var/lib/mysql/mysql.sock /tmp (Create symbolic link )
# service mysqld start
Now wen you run the command # mysql -u root -p and type password, it will directly take to mysql > prompt without error.

Leave a Reply