Uninstall Commercial MySQL Server on Ubuntu

Uninstall Commercial MySQL Server on Ubuntu

As part DB server decommission , We need to uninstall DB binary/packages from the DB server post DB backup with long term retention. 

Below are the steps for uninstalling MySQL Server package from ubuntu server:

1) On Ubuntu server , MySQL Server is installed as DEB package.

2) Before Uninstalling MySQL Server package , We need to stop MySQL server.

shell> sudo service mysql stop

3) Remove all the depending package .

4) Remove package from the server.

If you want to preserve configuration files and data, remove the package using dpkg command with -r option.

shell> sudo dpkg -r mysql

If you want to remove everything including configuration files and data, remove the package using -P option.

shell> sudo dpkg -P mysql-server mysql-client mysql-commercial-client mysql-commercial-client-core mysql-commercial-server mysql-commercial-server-core mysql-common




Logs:

root@mysqlhost01:/etc/mysql/mysql.conf.d# dpkg -l |grep -i mysql
ii  mysql-client                          8.0.17+commercial-1ubuntu18.04                  amd64        MySQL Client meta package depending on latest version
ii  mysql-commercial-client               8.0.17+commercial-1ubuntu18.04                  amd64        MySQL Client
ii  mysql-commercial-client-core          8.0.17+commercial-1ubuntu18.04                  amd64        MySQL Client Core Binaries
ii  mysql-commercial-server               8.0.17+commercial-1ubuntu18.04                  amd64        MySQL Server
ii  mysql-commercial-server-core          8.0.17+commercial-1ubuntu18.04                  amd64        MySQL Server Core Binaires
ii  mysql-common                          8.0.17+commercial-1ubuntu18.04                  amd64        Common files shared between packages
ii  mysql-server                          8.0.17+commercial-1ubuntu18.04                  amd64        MySQL Server meta package depending on latest version
root@mysqlhost01:/etc/mysql/mysql.conf.d# dpkg -P mysql
dpkg: warning: ignoring request to remove mysql which isn't installed
root@mysqlhost01:/etc/mysql/mysql.conf.d# dpkg -P mysql-server
(Reading database ... 162070 files and directories currently installed.)
Removing mysql-server (8.0.17+commercial-1ubuntu18.04) ...
root@mysqlhost01:/etc/mysql/mysql.conf.d# dpkg -l |grep -i mysql
ii  mysql-client                          8.0.17+commercial-1ubuntu18.04                  amd64        MySQL Client meta package depending on latest version
ii  mysql-commercial-client               8.0.17+commercial-1ubuntu18.04                  amd64        MySQL Client
ii  mysql-commercial-client-core          8.0.17+commercial-1ubuntu18.04                  amd64        MySQL Client Core Binaries
ii  mysql-commercial-server               8.0.17+commercial-1ubuntu18.04                  amd64        MySQL Server
ii  mysql-commercial-server-core          8.0.17+commercial-1ubuntu18.04                  amd64        MySQL Server Core Binaires
ii  mysql-common                          8.0.17+commercial-1ubuntu18.04                  amd64        Common files shared between packages
root@mysqlhost01:/etc/mysql/mysql.conf.d# dpkg -P mysql-client mysql-commercial-client mysql-commercial-client-core mysql-commercial-server mysql-commercial-server-core mysql-common
(Reading database ... 162064 files and directories currently installed.)
Removing mysql-commercial-server (8.0.17+commercial-1ubuntu18.04) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Purging configuration files for mysql-commercial-server (8.0.17+commercial-1ubuntu18.04) ...
.
dpkg: warning: while removing mysql-commercial-server, directory '/etc/mysql/mysql.conf.d' not empty so not removed
Removing mysql-commercial-server-core (8.0.17+commercial-1ubuntu18.04) ...
Removing mysql-client (8.0.17+commercial-1ubuntu18.04) ...
Removing mysql-commercial-client (8.0.17+commercial-1ubuntu18.04) ...
Purging configuration files for mysql-commercial-client (8.0.17+commercial-1ubuntu18.04) ...
Removing mysql-commercial-client-core (8.0.17+commercial-1ubuntu18.04) ...
Removing mysql-common (8.0.17+commercial-1ubuntu18.04) ...
Purging configuration files for mysql-common (8.0.17+commercial-1ubuntu18.04) ...
update-alternatives: warning: alternative /etc/mysql/my.cnf.fallback (part of link group my.cnf) doesn't exist; removing from list of alternatives
update-alternatives: warning: /etc/alternatives/my.cnf is dangling; it will be updated with best choice
dpkg: warning: while removing mysql-common, directory '/etc/mysql' not empty so not removed
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
root@mysqlhost01:/etc/mysql/mysql.conf.d#

you can learn more about MySql and InnoDB from below books:

========================================================================
You can also , Visit our Blogs for related topic on installation and Uninstallation:

Comments

Popular posts from this blog

Restore MySQL Database from mysqlbackup

Oracle 19c New Features

Install & Configure MySQL Router - MySQL InnoDB Cluster