0
votes

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

4
This Q is not about programming as defined for StackOverflow. It may be more appropriate on the related site unix.stackexchange.com (Unix & Linux). Consider using the flag link at the bottom of your Q and ask the moderator to move it. Please don't post the same Q on 2 different sites. Thanks and Good Luck. - shellter

4 Answers

2
votes

try this:

sudo apt-get purge mysql-server
0
votes

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.

0
votes

apt automatically installs the latest version available in the added repositories.

to see all the available versions in your enabled repositories, run

apt-cache policy mysql-server

if the version you want to install is not listed in the output, then you might need to add extra repositories.

Coming to 254 not upgraded part, it just means that updates for 254 packages are available in the repositories. You can install those updates using

sudo apt-get upgrade
0
votes

Try uninstalling it from software manager and restart the system, it worked for me.