Novell Home

My Favorites

Close

Please to see your favorites.

How to uninstall MySQL

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

Environment

Novell Vibe OnPrem
SUSE Linux Enterprise Server 11

Situation

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)'

Resolution

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
  5. PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    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'

Cause

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.

Disclaimer

This Support Knowledgebase provides a valuable tool for NetIQ/Novell/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-13
  • Modified Date:17-JUL-13
    • NovellVibe
    • SUSESUSE Linux Enterprise Server

Did this document solve your problem? Provide Feedback