Jusqu'à présent, j'ai essayé les commandes suivantes:
Sudo apt-get remove mysql-server mysql-client mysql-common
Sudo apt-get purge mysql-server mysql-client mysql-common
Sudo apt-get autoremove
Mais chaque fois que j'essaie de localiser MySQL à l'aide de la commande suivante, je reçois une liste de fichiers liés à MySQL:
Shell>> locate mysql
Sortie:
/etc/mysql
/etc/apparmor.d/usr.sbin.mysqld
/etc/apparmor.d/abstractions/mysql
/etc/apparmor.d/cache/usr.sbin.mysqld
/etc/apparmor.d/cache/usr.sbin.mysqld-akonadi
/etc/apparmor.d/local/usr.sbin.mysqld
/etc/bash_completion.d/mysqladmin
/etc/init/mysql.conf
/etc/logcheck/ignore.d.paranoid/mysql-server-5_5
/etc/logcheck/ignore.d.server/mysql-server-5_5
/etc/logcheck/ignore.d.workstation/mysql-server-5_5
/etc/logrotate.d/mysql-server
/etc/mysql/conf.d
/etc/mysql/debian-start
/etc/mysql/debian.cnf
/etc/mysql/conf.d/mysqld_safe_syslog.cnf
/home/pkr/.mysql_history
/home/pkr/.cache/software-center/piston-helper/rec.ubuntu.com,api,1.0,recommend_app,libqt4-sql-mysql,,349051c3a57da571aa832adb39177aff
/home/pkr/.cache/software-center/piston-helper/rec.ubuntu.com,api,1.0,recommend_app,mysql-client,,cbf77a486cdc80547317981a33144427
/home/pkr/.cache/software-center/piston-helper/rec.ubuntu.com,api,1.0,recommend_app,mysql-client,,de8220dee4d957a9502caa79e8d2fdda
/home/pkr/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,any,any,any,libqt4-sql-mysql,page,1,helpful,,17fb2e657321dc51526ee8fe9928da30
/home/pkr/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,any,any,any,mysql-client,page,1,helpful,,a4c1b6e8200f36ab5745c6f81f14da0a
/home/pkr/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,ubuntu,oneiric,any,libqt4-sql-mysql,page,1,helpful,,c54295fb82b8183350cd34f22c3547ef
/home/pkr/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,ubuntu,oneiric,any,mysql-client,page,1,helpful,,fcf201c1abff3f774af89173a84de2cc
/home/pkr/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,ubuntu,precise,any,libqt4-sql-mysql,page,1,helpful,,0cd86648584efeccfb16119012f89540
/home/pkr/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,ubuntu,precise,any,mysql-client,page,1,helpful,,eb84724e9da7851ff8862a227d8bac59
/home/pkr/.local/share/akonadi/mysql.conf
/home/pkr/.local/share/akonadi/db_data/mysql
/home/pkr/.local/share/akonadi/db_data/mysql.err
/home/pkr/.local/share/akonadi/db_data/mysql.err.old
/home/pkr/.local/share/akonadi/db_data/mysql/columns_priv.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/columns_priv.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/columns_priv.frm
/home/pkr/.local/share/akonadi/db_data/mysql/db.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/db.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/db.frm
/home/pkr/.local/share/akonadi/db_data/mysql/event.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/event.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/event.frm
/home/pkr/.local/share/akonadi/db_data/mysql/func.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/func.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/func.frm
/home/pkr/.local/share/akonadi/db_data/mysql/general_log.CSM
/home/pkr/.local/share/akonadi/db_data/mysql/general_log.CSV
/home/pkr/.local/share/akonadi/db_data/mysql/general_log.frm
/home/pkr/.local/share/akonadi/db_data/mysql/help_category.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/help_category.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/help_category.frm
/home/pkr/.local/share/akonadi/db_data/mysql/help_keyword.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/help_keyword.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/help_keyword.frm
/home/pkr/.local/share/akonadi/db_data/mysql/help_relation.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/help_relation.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/help_relation.frm
/home/pkr/.local/share/akonadi/db_data/mysql/help_topic.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/help_topic.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/help_topic.frm
/home/pkr/.local/share/akonadi/db_data/mysql/Host.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/Host.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/Host.frm
/home/pkr/.local/share/akonadi/db_data/mysql/ndb_binlog_index.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/ndb_binlog_index.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/ndb_binlog_index.frm
/home/pkr/.local/share/akonadi/db_data/mysql/plugin.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/plugin.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/plugin.frm
/home/pkr/.local/share/akonadi/db_data/mysql/proc.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/proc.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/proc.frm
/home/pkr/.local/share/akonadi/db_data/mysql/procs_priv.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/procs_priv.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/procs_priv.frm
/home/pkr/.local/share/akonadi/db_data/mysql/proxies_priv.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/proxies_priv.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/proxies_priv.frm
/home/pkr/.local/share/akonadi/db_data/mysql/servers.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/servers.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/servers.frm
/home/pkr/.local/share/akonadi/db_data/mysql/slow_log.CSM
/home/pkr/.local/share/akonadi/db_data/mysql/slow_log.CSV
/home/pkr/.local/share/akonadi/db_data/mysql/slow_log.frm
/home/pkr/.local/share/akonadi/db_data/mysql/tables_priv.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/tables_priv.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/tables_priv.frm
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone.frm
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_leap_second.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_leap_second.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_leap_second.frm
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_name.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_name.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_name.frm
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_transition.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_transition.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_transition.frm
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_transition_type.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_transition_type.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/time_zone_transition_type.frm
/home/pkr/.local/share/akonadi/db_data/mysql/user.MYD
/home/pkr/.local/share/akonadi/db_data/mysql/user.MYI
/home/pkr/.local/share/akonadi/db_data/mysql/user.frm
/usr/bin/mysql
/usr/bin/mysql_install_db
/usr/bin/mysql_upgrade
/usr/bin/mysqlcheck
/usr/sbin/mysqld
/usr/share/mysql
/usr/share/app-install/desktop/gmysqlcc:gmysqlcc.desktop
/usr/share/app-install/desktop/mysql-client.desktop
/usr/share/app-install/desktop/mysql-navigator:mysql-navigator.desktop
/usr/share/app-install/desktop/mysql-server.desktop
/usr/share/app-install/icons/gmysqlcc-32.png
/usr/share/app-install/icons/mysql-navigator.png
/usr/share/doc/mysql-client-core-5.5
/usr/share/doc/mysql-server-core-5.5
/usr/share/kde4/apps/katepart/syntax/sql-mysql.xml
/usr/share/man/man1/mysql.1.gz
/usr/share/man/man1/mysql_install_db.1.gz
/usr/share/man/man1/mysql_upgrade.1.gz
/usr/share/man/man1/mysqlcheck.1.gz
/usr/share/man/man8/mysqld.8.gz
/var/cache/apt/archives/akonadi-backend-mysql_1.7.2-0ubuntu1_all.deb
/var/cache/apt/archives/libmysqlclient-dev_5.5.22-0ubuntu1_i386.deb
/var/cache/apt/archives/libmysqlclient18_5.5.22-0ubuntu1_i386.deb
/var/cache/apt/archives/libqt4-sql-mysql_4%3a4.8.1-0ubuntu4.1_i386.deb
/var/cache/apt/archives/mysql-client-5.5_5.5.22-0ubuntu1_i386.deb
/var/cache/apt/archives/mysql-client-core-5.5_5.5.22-0ubuntu1_i386.deb
/var/cache/apt/archives/mysql-client_5.5.22-0ubuntu1_all.deb
/var/cache/apt/archives/mysql-common_5.5.22-0ubuntu1_all.deb
/var/cache/apt/archives/mysql-server-5.5_5.5.22-0ubuntu1_i386.deb
/var/cache/apt/archives/mysql-server-core-5.5_5.5.22-0ubuntu1_i386.deb
/var/cache/apt/archives/mysql-server_5.5.22-0ubuntu1_all.deb
/var/lib/dpkg/info/mysql-client-core-5.5.list
/var/lib/dpkg/info/mysql-client-core-5.5.md5sums
/var/lib/dpkg/info/mysql-server-5.5.list
/var/lib/dpkg/info/mysql-server-5.5.postrm
/var/lib/dpkg/info/mysql-server-core-5.5.list
/var/lib/dpkg/info/mysql-server-core-5.5.md5sums
/var/log/mysql
/var/log/mysql.err
/var/log/mysql.log
/var/log/mysql.log.1.gz
/var/log/mysql.log.2.gz
/var/log/mysql.log.3.gz
/var/log/mysql.log.4.gz
/var/log/mysql.log.5.gz
/var/log/mysql.log.6.gz
/var/log/mysql.log.7.gz
/var/log/upstart/mysql.log.1.gz
/var/log/upstart/mysql.log.2.gz
/var/log/upstart/mysql.log.3.gz
/var/log/upstart/mysql.log.4.gz
/var/log/upstart/mysql.log.5.gz
/var/log/upstart/mysql.log.6.gz
/var/log/upstart/mysql.log.7.gz
Qu'est-ce que je devrais faire maintenant?
J'essaie de savoir s'il est possible de supprimer tous les fichiers liés à MySQL, puis de réinstaller MySQL.
J'en ai besoin pour la connectivité Qt.
Avec la commande:
Sudo apt-get remove --purge mysql\*
vous pouvez supprimer tout ce qui concerne les paquets nommés mysql. Ces commandes ne sont valides que sur les distributions Linux basées sur debian/debian (Ubuntu par exemple).
Vous pouvez lister tous les paquets mysql installés avec la commande:
Sudo dpkg -l | grep -i mysql
Pour plus de nettoyage du cache du paquet, vous pouvez utiliser la commande:
Sudo apt-get clean
Aussi, n'oubliez pas d'utiliser la commande:
Sudo updatedb
Sinon, la commande "localiser" affichera les anciennes données.
Pour réinstaller mysql, utilisez la commande suivante:
Sudo apt-get install libmysqlclient-dev mysql-client
Cela installera le client mysql, libmysql et ses fichiers d’en-têtes.
Pour installer le serveur mysql, utilisez la commande:
Sudo apt-get install mysql-server
Juste un petit ajout à la réponse de @ dAm2k:
En plus de Sudo apt-get remove --purge mysql\*
J'ai fait un Sudo apt-get remove --purge mariadb\*
.
Il semble que dans la nouvelle version de debian (stretch), lorsque vous installez mysql, installez le paquet mariadb avec.
J'espère que ça aide.