[GUIDE] Fix openmediavault-mysql 1.0.10 plugin access denied after first change

    • OMV 1.0

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [GUIDE] Fix openmediavault-mysql 1.0.10 plugin access denied after first change

      Hi, while setting up MySQL using the omv-extras.org plugin I encountered an access denial after changing my root password.
      At first I thought I made a mistake setting things up using the WebGUI, but after repeating the same precess 3 times, I realized that there might be something else
      I started searching for a solution on the forum and Google, but couldn't find any straight forward one. I could also see that many people seemed like dealing with a similar problem.
      I decided to post a resume of what to do to help whoever has issues like me with this plugin. If it's in the wrong section, I'm sorry, I'm still new around.

      What you should already have done:
      -Install OMV-Extras.org (openmediavault-omvextrasorg 1.0.16).
      -Install MySQL plugin from the plugins (openmediavault-mysql 1.0.10).

      What leads to the problem:
      -Enable the MySQL service.
      -Go to the SQL web interface and login with root and a blank password.
      -Give a password to root@(localhost, 127.0.0.1, youromvname) and then... You can't login anymore.
      The web interface will give you an access denied, the service will be impossible to stop or restart and you will have error messages while trying to uninstall it.
      From what I could read the reason is that the user debian-sys-maint's password did not synch properly between /etc/mysql/debian.cnf and mysql.user.
      This user is the one with the rights to start and shutdown MySQL.

      What to do:
      1- To make sure we are at the same point to start with, completely remove MySQL from your system. The steps at the end of this post help with it: Also MySQL Problem with OMV 1.x
      2- Reinstall openmediavault-mysql 1.0.10 plugin
      3- Enable the MySQL service, log and set your root password.
      4-Open a SSH or use the CLI on your OMV machine.

      Source Code

      1. vi /etc/mysql/debian.cnf (get the_password)
      2. mysql -u root -p
      3. (Enter password)
      4. mysql>GRANT SHUTDOWN ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'the_password';
      5. Query OK, 0 rows affected (0.00 sec) (this should show up)
      6. GRANT SELECT ON `mysql`.`user` TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'the_password';
      7. Query OK, 0 rows affected (0.00 sec)
      8. mysql> \q
      9. Bye
      Display All


      5-Reboot your server. Well you could try restarting the service, but for me it didn't work. I had to reboot and tadam! It works!
      Now, the service runs properly and you can access the management site.

      Instead of the 2 lines I gave above it is possible to run this one instead:

      Source Code

      1. GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'the_password';
      From what I read it's not recommended for security purposes.

      I hope it helps, this is my first attempt at a guide here. :)

      Main Sources:
      Also MySQL Problem with OMV 1.x
      linuxquestions.org/questions/l…to-change-it-back-216586/
      mirzmaster.wordpress.com/2009/…ebian-sys-maintlocalhost/
    • Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit