Skip to content

Uninstall Percona Server for MySQL

To completely uninstall Percona Server for MySQL, remove all the installed packages and data files.

  1. Stop the Percona Server for MySQL service:

    $ sudo systemctl stop mysql
    
  2. As a superuser, either root or using sudo, use yum and the remove option. You can use the remove option to remove a specific package or a group of packages. In the example, the command removes all packages starting with percona-server.

    $ sudo yum remove percona-server*
    
  3. The first command removes the /var/lib/mysql directory and everything within it. The second command removes the /etc/my.cnf file, the main configuration file for Percona Server for MySQL.

    Warning

    This step removes all the packages and deletes all the data files (databases, tables, logs, and other files). Take a backup before doing this in case you need the data.

    $ rm -rf /var/lib/mysql
    $ rm -f /etc/my.cnf
    

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.


Last update: 2024-03-22