I had MySQL installed on my server. However, some of its files got deleted. As a result it stopped working.

So, I think I need to reinstall MySQL on my server.

Can anyone suggest me how to that ? I am using LINUX server for now .

link|improve this question
1  
Would you care to give us more details about what files where deleted and how? It may make a huge difference about what you need to do to restore. – Zoredache Aug 20 '11 at 7:44
feedback

migrated from stackoverflow.com Aug 20 '11 at 7:29

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 1 down vote accepted

This link includes all what you are searching for under installing mysql section:

Please have a view:

https://help.ubuntu.com/community/ApacheMySQLPHP

OR just follow these simple steps:

Installation Steps:

To install MySQL, run the following command from a terminal prompt:

sudo apt-get install mysql-server

During the installation process you will be prompted to enter a password for the MySQL root user.

Once the installation is complete, the MySQL server should be started automatically. You can run the following command from a terminal prompt to check whether the MySQL server is running:

sudo netstat -tap | grep mysql

When you run this command, you should see the following line or something similar:

tcp        0      0 localhost.localdomain:mysql           *:* LISTEN -

If the server is not running correctly, you can type the following command to start it:

sudo /etc/init.d/mysql restart

Configuration Steps:

You can edit the /etc/mysql/my.cnf file to configure the basic settings -- log file, port number, etc. For example, to configure MySQL to listen for connections from network hosts, change the bind_address directive to the server's IP address:

bind-address            = 192.168.0.5

Dont forget to Replace 192.168.0.5 with the appropriate address.

After making a change to /etc/mysql/my.cnf the mysql daemon will need to be restarted:

sudo /etc/init.d/mysql restart

Once i faced the same problem. and got fixed by following above steps.

Hope this helps.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.