Results 1 to 3 of 3

Thread: How to completely remove MySQL including users etc

  1. #1
    Join Date
    Jul 2008
    Location
    Netherlands
    Posts
    1,140

    Default How to completely remove MySQL including users etc

    How do I completely remove mysql, telling YaST software management to uninstall it and doing a sudo rm -R /var/lib/mysql/
    doesn't seem to be sufficient.

    After rebooting my router (which is most likely unrelated) I wanted to resume my work.. but the PHP software informed me it couldn't contact the database, next step was phpMyAdmin which wouldn work either.
    So I thought I'd rerun /usr/bin mysql_secure_installation, but I get stuck at the first step. It wont recognize my password.

    So I tried to reset the password with the following
    Code:
    pkill mysqld   
    mysqld_safe --skip-grant-tables &
    mysql -u root mysql
    UPDATE user SET password=PASSWORD("ualue=42") WHERE user="root";
          FLUSH PRIVILEGES;
    Which got me the result
    Code:
    Query OK, 0 rows affected (0.01 sec)                                                           
    Rows matched: 0  Changed: 0  Warnings: 0                                                       
    
    Query OK, 0 rows affected (0.02 sec)
    matched 0? Seems like I'm missing the entire root user, I don't care much for having to start over with a fresh mysql install.. but it doesn't seem to let me. /usr/bin mysql_secure_installation always gets me stuck on the first step (triedd both the password it should be and leaving it blank)
    Special effects <- KDE 4.2 Showing off
    More KDE -> PINK KDE

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,245

    Default Re: How to completely remove MySQL including users etc

    When I read this I would summarize:

    . uninstalled through YaST softeare management every package that started with mysql;
    . removed all of the database data (inclusing administration;
    . some software (PHP) that uses MySQL is appently still running and complains (not amazing to me);
    . you run mysql_secure_installation, which is provided by the mysql package which you just deinstalled!

    From this point on I am flabbergasted.
    Henk van Velden

  3. #3
    Join Date
    Jul 2008
    Location
    Netherlands
    Posts
    1,140

    Default Re: How to completely remove MySQL including users etc

    More like
    Error
    Double check with another app, still an error
    Rerun /usr/bin mysql_secure_installation (password error)
    Uninstall everything I can find, try /usr/bin mysql_secure_installation again (password error)
    Try to alter the user rights table via query.. user doesn't exist

    Wondering why the hell it didn't exist trying to run /usr/bin mysql_secure_installation again.. still password error.
    Special effects <- KDE 4.2 Showing off
    More KDE -> PINK KDE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •