I have mysql 5.5 installed in my system and i want to install new version ie. mysql 5.7 , so i am struggling to uninstall the older version. when i will try to install 5.7 ,it is installing 5.5. so i need help ... here is the command i executed:- sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mysql-client' is not installed, so not removed
Package 'mysql-client-core-5.5' is not installed, so not removed
Package 'mysql-common' is not installed, so not removed
Package 'mysql-server' is not installed, so not removed
Package 'mysql-server-core-5.5' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 254 not upgraded.
** i don't understand why 254 not upgraded
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 254 not upgraded.
sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
$ mysql --version(i jsust tyied to check the version)
The program 'mysql' can be found in the following packages: * mysql-client-core-5.5 * mariadb-client-core-5.5 * mysql-client-core-5.6 * percona-xtradb-cluster-client-5.5 Try: sudo apt-get install
sudo apt-get install mysql-server
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl
mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5
mysql-server-core-5.5
Suggested packages:
libmldbm-perl libnet-daemon-perl libplrpc-perl libsql-statement-perl tinyca
mailx
Recommended packages:
libhtml-template-perl
The following NEW packages will be installed:
libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl
mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server
mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 10 newly installed, 0 to remove and 254 not upgraded.
Need to get 0 B/9,257 kB of archives.
After this operation, 96.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]
its installing the previous version instead of new version. so please help me
答案 0 :(得分:1)
尝试一下:
sudo apt-get purge mysql-server
答案 1 :(得分:0)
Please try using this command to remove MySQL completely from your current Linux system including your databases, settings and everything else.
sudo apt-get purge mysql
Hopefully I didn't mistyped :p Let me know if it worked for you.
答案 2 :(得分:0)
apt
自动安装添加的存储库中可用的最新版本。
要查看已启用的存储库中的所有可用版本,请运行
apt-cache policy mysql-server
如果输出中未列出要安装的版本,则可能需要添加其他存储库。
来到254 not upgraded
部分,这只是意味着存储库中有254个软件包的更新。
您可以使用
sudo apt-get upgrade
答案 3 :(得分:0)
尝试从软件管理器中卸载它,然后重新启动系统,它对我有用。