web-dev-qa-db-fra.com

mysql enlève complètement

Je me suis cassé mon mysql et maintenant je veux le réinstaller complètement. J'ai essayé:

$ Sudo apt-get install --reinstall mysql-server
$ Sudo apt-get remove --purge mysql-client mysql-server

Mais toujours je vois popup avec proposition de changer le mot de passe root, je le change et j'ai une erreur que je peux le changer ..

$ Sudo apt-get remove --purge mysql-client mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mysql-client is not installed, so not removed
Package mysql-server is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libmygpo-qt1 libqtscript4-network libqtscript4-gui libtag-extras1 libqtscript4-sql libqtscript4-xml
  amarok-utils amarok-common libqtscript4-uitools liblastfm0 libloudmouth1-0 libqtscript4-core
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.5 (5.5.28-0ubuntu0.12.04.2) ...
121114 19:04:03 [Note] Plugin 'FEDERATED' is disabled.
121114 19:04:03 InnoDB: The InnoDB memory heap is disabled
121114 19:04:03 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121114 19:04:03 InnoDB: Compressed tables use zlib 1.2.3.4
121114 19:04:03 InnoDB: Initializing buffer pool, size = 128.0M
121114 19:04:03 InnoDB: Completed initialization of buffer pool
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
121114 19:04:03 InnoDB: Could not open or create data files.
121114 19:04:03 InnoDB: If you tried to add new data files, and it failed here,
121114 19:04:03 InnoDB: you should now edit innodb_data_file_path in my.cnf back
121114 19:04:03 InnoDB: to what it was, and remove the new ibdata files InnoDB created
121114 19:04:03 InnoDB: in this failed attempt. InnoDB only wrote those files full of
121114 19:04:03 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
121114 19:04:03 InnoDB: remove old data files which contain your precious data!
121114 19:04:03 [ERROR] Plugin 'InnoDB' init function returned error.
121114 19:04:03 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
121114 19:04:03 [ERROR] Unknown/unsupported storage engine: InnoDB
121114 19:04:03 [ERROR] Aborting

121114 19:04:03 [Note] /usr/sbin/mysqld: Shutdown complete

start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)

C'est bien pour moi que je n'ai pas de bases de données importantes, mais ..

EDIT

$ Sudo apt-get remove mysql-server
[Sudo] password for teplyakov: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  mysql-server
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 115 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 303491 files and directories currently installed.)
Removing mysql-server ...
Setting up mysql-server-5.5 (5.5.28-0ubuntu0.12.04.2) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)

Je suis particulièrement confus avec ça:

Removing mysql-server ...
Setting up mysql-server-5.5 (5.5.28-0ubuntu0.12.04.2) ...
start: Job failed to start
1
Dmitry Teplyakov

Ici, j’ai trouvé des astuces vaudou qui m’ont peut-être été utiles: https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/98935

J'ai supprimé les paquets suivants, puis réinstallé mysql-server:

Sudo apt-get --purge remove mysql-server-5.1 mysql-server-5.5
Sudo apt-get install mysql-server
1
David Fischer