How to uninstall MySQL

This document (7012894) is provided subject to the disclaimer at the end of this document.


Novell Vibe OnPrem
SUSE Linux Enterprise Server 11


Unable to connect to MySQL database as root and don't know the current password to change it.
When trying to access the MySQL database, the following error is displayed:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'


If the current root password is known, you can change the root password with the following command:
mysqladmin -uroot -p<currentPass> password <newPass>

Back up any Vibe Data that is needed, see documentation for Backing Up and Restoring Vibe Data.
Please follow these steps to uninstall MySQL:
  1. YaST | Software Management | Search for mysql
  2. Right-click mysql Server part of MySQL Community Server and select Delete
  3. Select Accept
  4. Either remove or rename /var/lib/mysql:
    • rm -R /var/lib/mysql
    • mv /var/lib/mysql /var/lib/mysql.old

Please follow these steps to reinstall MySQL fresh (creation of new password):

  1. YaST | Software Management | Search for mysql
  2. Right-click mysql Server part of MySQL Community Server and select Install
  3. Select Accept and Continue.
  4. Start the MySQL daemon:
    rcmysql start
    To do so, start the server, then issue the following commands:

    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h tharris7 password 'new-password'


Uninstall / Reinstall MySQL - prompts creation for a fresh new root password in case the original root password has been forgotten. There are possibly other solutions or workarounds to this issue, but this is one way to get a freshly created password for root.


This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7012894
  • Creation Date: 17-Jul-2013
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact:

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center