Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've never had problems installing and configuring mysql server in kubuntu but now it's just being stubborn, here's my issue:

I installed the packages mysql-server, mysql-client (both 5.1), the server package asked me to put a root password, which I did, it then started saying "access denied", on anything

Later on, I decided to purge the packages and re-install and gave a tweak to the my.cnf and not it says

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Please, is there a way to do a fresh start on this and do it right this time? I don't know if I'm missing something but the /var/lib/mysql is not empty but there is no .pid, now the mysql service won't start, there is no mysql.sock either

Any help appreciated

share|improve this question

1 Answer 1

up vote 6 down vote accepted

To perform a clean reinstall:

sudo killall mysqld    
sudo apt-get purge mysql-common
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get install mysql-server

Then

mysql -u root -p

Enter the configured password.

share|improve this answer
    
The Mysql-common package wants to remove a lot of packages =/ –  allenskd Dec 30 '10 at 22:53
    
mysql-common is reponsible for the default /etc/mysql, "sudo apt-get install --reinstall mysql-common" might also work, but my experience with a similar problem was to remove/install the package after manually editing /etc/mysql/* . –  João Pinto Dec 30 '10 at 22:58
    
It didn't work, still claiming that there is no mysql.sock –  allenskd Dec 30 '10 at 23:12
    
Did you follow the entire procedure ? Dit it ask for a password during the mysql-server install ? –  João Pinto Dec 30 '10 at 23:19
    
Yes, I followed it throughly, it also deleted all the my.cnf so when I tried to start the mysql server it rejected it since it had no direction whatsoever, so I decided to search for the default my.cnf and got it working completely, currently logged in mysql console with the root user, phew, thanks a lot for your help! (summary: my.cnf was missing so it didn't start) created it in /etc/mysql and type sudo start mysql it started with no problem :) –  allenskd Dec 30 '10 at 23:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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