We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,703 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Completely uninstall and remove everything from a MySQL install in Linux?

Hey

Im trying to start from scratch a MySQL installation in Linux but for some reason through apt-get and the software center, when I remove it, my users (and privileges) still exist. How can I remove everything releated to MySQL and start from 0?

Thank you

2
Contributors
5
Replies
14 Hours
Discussion Span
1 Year Ago
Last Updated
6
Views
riahc3
 
Team Colleague
1,311 posts since May 2008
Reputation Points: 60
Solved Threads: 13
Skill Endorsements: 11

Look for the value of datadir in /etc/mysql/my.cnf or /etc/my.cnf, respectively. Usually it's /var/lib/mysql.
Unintall mysql with apt-get.
Delete this data directory with all subdirectories.
Delete all in /etc/mysql and /etc/my.ini, /etc/my.cnf etc.
Re-install mysql.

smantscheff
Nearly a Posting Virtuoso
1,297 posts since Oct 2010
Reputation Points: 321
Solved Threads: 270
Skill Endorsements: 8

Look for the value of datadir in /etc/mysql/my.cnf or /etc/my.cnf, respectively. Usually it's > /var/lib/mysql.
Unintall mysql with apt-get.
Delete this data directory with all subdirectories.
Delete all in /etc/mysql and /etc/my.ini, /etc/my.cnf etc.
Re-install mysql.

Ill try this tommorow at work. Its really getting annoying...

Thanks :)

riahc3
 
Team Colleague
1,311 posts since May 2008
Reputation Points: 60
Solved Threads: 13
Skill Endorsements: 11

Did not work. /etc/my.ini, /etc/my.cnf did not exist.

riahc3
 
Team Colleague
1,311 posts since May 2008
Reputation Points: 60
Solved Threads: 13
Skill Endorsements: 11

Now this:

120411 8:47:23 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/user.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/user.frm' (errno: 13)
120411 8:47:23 [ERROR] Aborting

120411 8:47:23 InnoDB: Starting shutdown...
120411 8:47:24 InnoDB: Shutdown completed; log sequence number 1595675
120411 8:47:24 [Note] /usr/sbin/mysqld: Shutdown complete

start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error al procesar mysql-server-5.5 (--configure):
el subproceso instalado el script post-installation devolvió el código de salida de error 1
dpkg: problemas de dependencias impiden la configuración de mysql-server:
mysql-server depende de mysql-server-5.5; sin embargo:
El paquete `mysql-server-5.5' no está configurado todavía.
dpkg: error al procesar mysql-server (--configure):
problemas de dependencias - se deja sin configurar
No se escribió un informe «apport» porque el mensaje de error indica que es un mensaje de error asociado a un fallo previo.
Se encontraron errores al procesar:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

riahc3
 
Team Colleague
1,311 posts since May 2008
Reputation Points: 60
Solved Threads: 13
Skill Endorsements: 11

FINALLY!!!!!!

Follow this: http://stuffthatspins.com/2011/01/08/ubuntu-10-x-completely-remove-and-clean-mysql-installation/ Works like a charm. Used it on Ubuntu 12.04 and still worked.

riahc3
 
Team Colleague
1,311 posts since May 2008
Reputation Points: 60
Solved Threads: 13
Skill Endorsements: 11

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0735 seconds using 2.67MB