MySQL Install / Uninstall issue

    • OMV 2.x

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

    • MySQL Install / Uninstall issue

      Trying to uninstall / re-install MySQL via plugin.

      Uninstall error:

      Display Spoiler
      ]<html>
      <head><title>502 Bad Gateway</title></head>
      <body bgcolor="white">
      <center><h1>502 Bad Gateway</h1></center>
      <hr><center>nginx</center>
      </body>
      </html>
      <!-- a padding to disable MSIE and Chrome friendly error page -->
      <!-- a padding to disable MSIE and Chrome friendly error page -->
      <!-- a padding to disable MSIE and Chrome friendly error page -->
      <!-- a padding to disable MSIE and Chrome friendly error page -->
      <!-- a padding to disable MSIE and Chrome friendly error page -->
      <!-- a padding to disable MSIE and Chrome friendly error page -->


      Then see the following error on plugin install:
      Display Spoiler
      Reading package lists...
      Building dependency tree...
      Reading state information...
      The following extra packages will be installed:
      dbconfig-common mywebsql php5 php5-mysqlnd php5-pgsql php5-sqlite
      The following NEW packages will be installed:
      dbconfig-common mywebsql openmediavault-mysql php5 php5-mysqlnd php5-pgsql
      php5-sqlite
      0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
      Need to get 0 B/2010 kB of archives.
      After this operation, 6250 kB of additional disk space will be used.
      WARNING: The following packages cannot be authenticated!
      php5-mysqlnd php5-pgsql php5-sqlite dbconfig-common php5 mywebsql
      openmediavault-mysql
      Preconfiguring packages ...
      Authentication warning overridden.
      Selecting previously unselected package php5-mysqlnd.
      (Reading database ... 31841 files and directories currently installed.)
      Unpacking php5-mysqlnd (from .../php5-mysqlnd_5.4.45-0+deb7u1_amd64.deb) ...
      Selecting previously unselected package php5-pgsql.
      Unpacking php5-pgsql (from .../php5-pgsql_5.4.45-0+deb7u1_amd64.deb) ...
      Selecting previously unselected package php5-sqlite.
      Unpacking php5-sqlite (from .../php5-sqlite_5.4.45-0+deb7u1_amd64.deb) ...
      Selecting previously unselected package dbconfig-common.
      Unpacking dbconfig-common (from .../dbconfig-common_1.8.47+nmu1_all.deb) ...
      Selecting previously unselected package php5.
      Unpacking php5 (from .../php5_5.4.45-0+deb7u1_all.deb) ...
      Selecting previously unselected package mywebsql.
      Unpacking mywebsql (from .../mywebsql_3.6-omv4_all.deb) ...
      Selecting previously unselected package openmediavault-mysql.
      Unpacking openmediavault-mysql (from .../openmediavault-mysql_1.0.16_all.deb) ...
      Processing triggers for php5-fpm ...
      Restarting PHP5 FastCGI Process Manager: php5-fpm.
      Processing triggers for man-db ...
      Processing triggers for openmediavault ...
      Restarting engine daemon ...
      Setting up php5-mysqlnd (5.4.45-0+deb7u1) ...

      Creating config file /etc/php5/mods-available/mysqlnd.ini with new version

      Creating config file /etc/php5/mods-available/mysql.ini with new version

      Creating config file /etc/php5/mods-available/mysqli.ini with new version

      Creating config file /etc/php5/mods-available/pdo_mysql.ini with new version
      Setting up php5-pgsql (5.4.45-0+deb7u1) ...

      Creating config file /etc/php5/mods-available/pgsql.ini with new version

      Creating config file /etc/php5/mods-available/pdo_pgsql.ini with new version
      Setting up php5-sqlite (5.4.45-0+deb7u1) ...

      Creating config file /etc/php5/mods-available/sqlite3.ini with new version

      Creating config file /etc/php5/mods-available/pdo_sqlite.ini with new version
      Setting up dbconfig-common (1.8.47+nmu1) ...

      Creating config file /etc/dbconfig-common/config with new version
      Setting up php5 (5.4.45-0+deb7u1) ...
      Setting up mywebsql (3.6-omv4) ...
      Setting up openmediavault-mysql (1.0.16) ...

      >>> *************** Error ***************
      Bad Gateway
      <<< *************************************
      Processing triggers for php5-fpm ...
      Restarting PHP5 FastCGI Process Manager: php5-fpm.
      Processing triggers for openmediavault ...
      Updating locale files ...
      Updating file permissions ...
      Purging internal cache ...
      Restarting engine daemon ...
      Creating index of upgradeable packages ...
      Creating index of openmediavault plugins ...
      Done ...


      Then if enbled...
      Display Spoiler
      Error #4000:
      exception 'OMVException' with message 'Failed to execute command 'omv-mkconf mysql 2>&1': Unable to find any database files in /var/lib/mysql.
      Unable to find any database files in /media/26ca4497-4a5c-47d3-80cc-1ff71b99321c/MySQL/.' in /usr/share/openmediavault/engined/module/mysql.inc:88
      Stack trace:
      #0 /usr/share/openmediavault/engined/rpc/config.inc(180): OMVModuleMySQL->applyConfig()
      #1 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      #3 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      #4 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      #5 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      #6 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      #7 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      #8 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      #9 {main}
    • The first error is a browser cache and/or nginx restarting error. Clear your browser cache. nginx restarting error is nothing to worry about.

      Bad gateway is probably a nginx restarting error.

      Last box shows the plugin installed fine but the database is missing. Do you have any existing databases? If not, try (as root): mysql_install_db
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Thanks. Cleared cache but same outcome. Used alternative browser, same again.
      Followed you instruction to create dbs..

      Source Code

      1. root@OMV:~# mysql_install_db
      2. Installing MySQL system tables...
      3. 151015 9:00:58 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
      4. 151015 9:00:58 [Note] /usr/sbin/mysqld (mysqld 5.5.44-0+deb7u1) starting as process 10604 ...
      5. OK
      6. Filling help tables...
      7. 151015 9:01:01 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
      8. 151015 9:01:01 [Note] /usr/sbin/mysqld (mysqld 5.5.44-0+deb7u1) starting as process 10610 ...
      9. OK
      10. To start mysqld at boot time you have to copy
      11. support-files/mysql.server to the right place for your system
      12. PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
      13. To do so, start the server, then issue the following commands:
      14. /usr/bin/mysqladmin -u root password 'new-password'
      15. /usr/bin/mysqladmin -u root -h OMV password 'new-password'
      16. Alternatively you can run:
      17. /usr/bin/mysql_secure_installation
      18. which will also give you the option of removing the test
      19. databases and anonymous user created by default. This is
      20. strongly recommended for production servers.
      21. See the manual for more instructions.
      22. You can start the MySQL daemon with:
      23. cd /usr ; /usr/bin/mysqld_safe &
      24. You can test the MySQL daemon with mysql-test-run.pl
      25. cd /usr/mysql-test ; perl mysql-test-run.pl
      26. Please report any problems at http://bugs.mysql.com/
      Display All


      Enabling the service..

      Source Code

      1. Error #4000:
      2. exception 'OMVException' with message 'Failed to execute command 'omv-mkconf mysql 2>&1': Unable to find any database files in /var/lib/mysql.
      3. Unable to find any database files in /media/26ca4497-4a5c-47d3-80cc-1ff71b99321c/MySQL/.' in /usr/share/openmediavault/engined/module/mysql.inc:88
      4. Stack trace:
      5. #0 /usr/share/openmediavault/engined/rpc/config.inc(180): OMVModuleMySQL->applyConfig()
      6. #1 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      7. #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      9. #4 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      10. #5 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      11. #6 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      12. #7 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      13. #8 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      14. #9 {main}
      Display All
    • You must have had a database installed at /media/26ca4497-4a5c-47d3-80cc-1ff71b99321c/MySQL/ previously though. I recommend purging the plugin, mysql, and users. I would also remove the /var/lib/mysql dir if it exists and /etc/mysql.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Removed plugin (which should purge mysql?). Not sure how to delete users?
      deleted /var/lib/mysql & /etc/mysql

      Installed plugin..

      Source Code

      1. ​Reading package lists...
      2. Building dependency tree...
      3. Reading state information...
      4. The following extra packages will be installed:
      5. dbconfig-common mywebsql php5 php5-mysqlnd php5-pgsql php5-sqlite
      6. The following NEW packages will be installed:
      7. dbconfig-common mywebsql openmediavault-mysql php5 php5-mysqlnd php5-pgsql
      8. php5-sqlite
      9. 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
      10. Need to get 0 B/2010 kB of archives.
      11. After this operation, 6250 kB of additional disk space will be used.
      12. WARNING: The following packages cannot be authenticated!
      13. php5-mysqlnd php5-pgsql php5-sqlite dbconfig-common php5 mywebsql
      14. openmediavault-mysql
      15. Preconfiguring packages ...
      16. Authentication warning overridden.
      17. Selecting previously unselected package php5-mysqlnd.
      18. (Reading database ... 32036 files and directories currently installed.)
      19. Unpacking php5-mysqlnd (from .../php5-mysqlnd_5.4.45-0+deb7u1_amd64.deb) ...
      20. Selecting previously unselected package php5-pgsql.
      21. Unpacking php5-pgsql (from .../php5-pgsql_5.4.45-0+deb7u1_amd64.deb) ...
      22. Selecting previously unselected package php5-sqlite.
      23. Unpacking php5-sqlite (from .../php5-sqlite_5.4.45-0+deb7u1_amd64.deb) ...
      24. Selecting previously unselected package dbconfig-common.
      25. Unpacking dbconfig-common (from .../dbconfig-common_1.8.47+nmu1_all.deb) ...
      26. Selecting previously unselected package php5.
      27. Unpacking php5 (from .../php5_5.4.45-0+deb7u1_all.deb) ...
      28. Selecting previously unselected package mywebsql.
      29. Unpacking mywebsql (from .../mywebsql_3.6-omv4_all.deb) ...
      30. Selecting previously unselected package openmediavault-mysql.
      31. Unpacking openmediavault-mysql (from .../openmediavault-mysql_1.0.16_all.deb) ...
      32. Processing triggers for php5-fpm ...
      33. Restarting PHP5 FastCGI Process Manager: php5-fpm.
      34. Processing triggers for man-db ...
      35. Processing triggers for openmediavault ...
      36. Restarting engine daemon ...
      37. Setting up php5-mysqlnd (5.4.45-0+deb7u1) ...
      38. Creating config file /etc/php5/mods-available/mysqlnd.ini with new version
      39. Creating config file /etc/php5/mods-available/mysql.ini with new version
      40. Creating config file /etc/php5/mods-available/mysqli.ini with new version
      41. Creating config file /etc/php5/mods-available/pdo_mysql.ini with new version
      42. Setting up php5-pgsql (5.4.45-0+deb7u1) ...
      43. Creating config file /etc/php5/mods-available/pgsql.ini with new version
      44. Creating config file /etc/php5/mods-available/pdo_pgsql.ini with new version
      45. Setting up php5-sqlite (5.4.45-0+deb7u1) ...
      46. Creating config file /etc/php5/mods-available/sqlite3.ini with new version
      47. Creating config file /etc/php5/mods-available/pdo_sqlite.ini with new version
      48. Setting up dbconfig-common (1.8.47+nmu1) ...
      49. Creating config file /etc/dbconfig-common/config with new version
      50. Setting up php5 (5.4.45-0+deb7u1) ...
      51. Setting up mywebsql (3.6-omv4) ...
      52. Setting up openmediavault-mysql (1.0.16) ...
      53. Processing triggers for php5-fpm ...
      54. Restarting PHP5 FastCGI Process Manager: php5-fpm.
      55. Processing triggers for openmediavault ...
      56. Updating locale files ...
      57. Updating file permissions ...
      58. Purging internal cache ...
      59. Restarting engine daemon ...
      60. Creating index of upgradeable packages ...
      61. Creating index of openmediavault plugins ...
      62. Done ...
      Display All



      Tried changing data directory & bind address, saved:

      HTML Source Code

      1. <html>
      2. <head><title>502 Bad Gateway</title></head>
      3. <body bgcolor="white">
      4. <center><h1>502 Bad Gateway</h1></center>
      5. <hr><center>nginx</center>
      6. </body>
      7. </html>
      8. <!-- a padding to disable MSIE and Chrome friendly error page -->
      9. <!-- a padding to disable MSIE and Chrome friendly error page -->
      10. <!-- a padding to disable MSIE and Chrome friendly error page -->
      11. <!-- a padding to disable MSIE and Chrome friendly error page -->
      12. <!-- a padding to disable MSIE and Chrome friendly error page -->
      13. <!-- a padding to disable MSIE and Chrome friendly error page -->
      Display All


      enabling the service..

      Source Code

      1. ​Error #4000:
      2. exception 'OMVException' with message 'Failed to execute command 'omv-mkconf mysql 2>&1': Unable to get current database location.' in /usr/share/openmediavault/engined/module/mysql.inc:88
      3. Stack trace:
      4. #0 /usr/share/openmediavault/engined/rpc/config.inc(180): OMVModuleMySQL->applyConfig()
      5. #1 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      6. #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      7. #3 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      8. #4 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      9. #5 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      10. #6 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      11. #7 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      12. #8 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      13. #9 {main}
      Display All
    • removing the plugin might not purge the plugin. I would purge individually and check output of dpkg -l to verify that it isn't just removed. Removing the config files is important too.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Thanks, sadly im not a linux expert. But managed to purge a few with SQL references but not all.

      root@OMV:~# dpkg --purge mysql-common
      dpkg: dependency problems prevent removal of mysql-common:
      mysql-client-5.5 depends on mysql-common (>= 5.5.44-0+deb7u1).
      libmysqlclient18:amd64 depends on mysql-common (>= 5.5.44-0+deb7u1).

      root@OMV:~# dpkg --purge mysql-client-5.5
      (Reading database ... 32030 files and directories currently installed.)
      Removing mysql-client-5.5 ...
      Processing triggers for man-db ...

      root@OMV:~# dpkg --purge mysql-common
      dpkg: dependency problems prevent removal of mysql-common:
      libmysqlclient18:amd64 depends on mysql-common (>= 5.5.44-0+deb7u1).
      dpkg: error processing mysql-common (--purge):
      dependency problems - not removing
      Errors were encountered while processing:
      mysql-common

      root@OMV:~# dpkg --purge mysql-server-5
      dpkg: warning: ignoring request to remove mysql-server-5 which isn't installed
      root@OMV:~#

      root@OMV:~# dpkg --purge mysql-server-c
      dpkg: warning: ignoring request to remove mysql-server-c which isn't installed
      root@OMV:~#

      root@OMV:~# dpkg --purge mywebsql
      (Reading database ... 31975 files and directories currently installed.)
      Removing mywebsql ...
      Purging configuration files for mywebsql ...
      rm: cannot remove `/var/lib/mywebsql': No such file or directory
      dpkg: error processing mywebsql (--purge):
      subprocess installed post-removal script returned error exit status 1
      Errors were encountered while processing:
      mywebsql



      The post was edited 1 time, last by johnyb ().

    • Now installing the plugin error as below..

      http://txt.do/a3ro7

      Then tried this .. apt-get -f install
      Now installs ok
      But when try to enable...
      Error #4000:
      exception 'OMVException' with message 'Failed to execute command 'omv-mkconf mysql 2>&1': Unable to get current database location.' in /usr/share/openmediavault/engined/module/mysql.inc:88
      Stack trace:
      #0 /usr/share/openmediavault/engined/rpc/config.inc(180): OMVModuleMySQL->applyConfig()
      #1 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      #3 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      #4 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      #5 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      #6 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      #7 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      #8 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      #9 {main}

      The post was edited 1 time, last by johnyb ().

    • If things don't go as planned, don't keep installing the plugin.

      mkdir -p /var/lib/mywebsql
      apt-get purge mysql* mywebsql
      rm -rfv /etc/mysql

      If dpkg -l | grep mysql returns nothing then install again. if not, don't install the plugin and post the output.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!