Rate This Document
Findability
Accuracy
Completeness
Readability

Uninstalling MySQL (Against Installation of the RPM Package from the Mirror Site)

Select an uninstallation mode based on your installation mode. If MySQL is installed using an RPM package from the mirror site, uninstall it by following the instructions in this section.

  1. Check the database process.
    1
    ps -ef | grep mysql
    
  2. Stop the database process.
    1
    /usr/local/mysql/bin/mysqladmin -uroot -p123456 shutdown -S /data/mysql/run/mysql.sock
    

    Or

    1
    kill -9 process_ID
    
  3. Exit the mysql user.
    exit
    whoami
  4. Uninstall the database RPM package.
    1
    2
    3
    rpm -qa | grep mysql
    rpm -e mysql-8.0.17-1.el7.aarch64
    rpm -qa | grep mysql
    
  5. Delete the installation directory and data directory.
    1
    2
    3
    4
    ls /usr/local/mysql
    rm -rf /usr/local/mysql
    ls /data/mysql
    rm -rf /data/mysql