Starting mysql in fedora 8 through terminal

Starting mysql in fedora 8 through terminal
===========================================

MySQL Error:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

Solution:
1. login as root in terminal
[Amol@localhost ~]$ su
Password:

2. Start the mysqld:
[root@localhost Amol]# /sbin/service mysqld start

You will get the following:
Initializing MySQL database: Installing MySQL system tables…

OK
Filling help tables…
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
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 password ‘new-password’
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com [ OK ]
Starting MySQL: [ OK ]

3. Now access the mysql prompt:
[root@localhost Amol]# mysql -u root

You will get the following:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.45 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql>

4. Create the database:
[root@localhost
project_directory]# rake db:create

5. Migrate the database:
[root@localhost
project_directory]# rake db:migrate

6. Loading the database:
[root@localhost project_directory]# rake db:fixtures:load

7. Now test your url http://localhost:3000 in a browser