mysql 1.0.16 failing install

    • OMV 1.0
    • Resolved

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

    • mysql 1.0.16 failing install

      Hi All

      I'm having issues with mysql plugin, when I go to (re)install it, the plugin installs but when I try to enable I get this error:

      Source Code

      1. Error #4000:
      2. exception 'OMVException' with message 'Failed to execute command 'export LANG=C; invoke-rc.d 'mysql' start 2>&1': Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
      3. invoke-rc.d: initscript mysql, action "start" failed.' in /usr/share/php/openmediavault/initscript.inc:176
      4. Stack trace:
      5. #0 /usr/share/php/openmediavault/initscript.inc(141): OMVSysVInitScript->invoke('start')
      6. #1 /usr/share/php/openmediavault/initscript.inc(61): OMVSysVInitScript->start()
      7. #2 /usr/share/openmediavault/engined/module/mysql.inc(117): OMVSysVInitScript->exec()
      8. #3 /usr/share/openmediavault/engined/rpc/config.inc(206): OMVModuleMySQL->startService()
      9. #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      10. #5 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      11. #6 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      12. #7 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      13. #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      14. #9 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      15. #10 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      16. #11 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      17. #12 {main}
      Display All


      Any ideas or suggestions gratefully received...
      HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64
    • mysql seems to be more sensitive than ever lately. I would only do the following if you don't have a database to lose.

      Source Code

      1. apt-get purge mysql-server-5.5 mysql-server-core-5.5 mysql-common
      2. apt-get autoremove
      3. rm -rfv /etc/mysql
      4. rm -rfv /var/lib/mysql
      5. reboot
      6. userdel mysql


      Then reinstall.
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.7
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • Thanks for the advice.
      I'm not sure if it is related but the issue started after I installed flashmemory (fs2ram). I've removed flashmemory now and followed your instructions to blow away mysql.

      But I get the same error when enabling mysql after the install

      Source Code

      1. Error #4000:
      2. exception 'OMVException' with message 'Failed to execute command 'export LANG=C; invoke-rc.d 'mysql' start 2>&1': Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
      3. invoke-rc.d: initscript mysql, action "start" failed.' in /usr/share/php/openmediavault/initscript.inc:176
      4. Stack trace:
      5. #0 /usr/share/php/openmediavault/initscript.inc(141): OMVSysVInitScript->invoke('start')
      6. #1 /usr/share/php/openmediavault/initscript.inc(61): OMVSysVInitScript->start()
      7. #2 /usr/share/openmediavault/engined/module/mysql.inc(117): OMVSysVInitScript->exec()
      8. #3 /usr/share/openmediavault/engined/rpc/config.inc(206): OMVModuleMySQL->startService()
      9. #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      10. #5 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      11. #6 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      12. #7 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      13. #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      14. #9 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      15. #10 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      16. #11 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      17. #12 {main}
      Display All


      Looking into syslog

      Source Code

      1. ​error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'


      Seems to occur when trying to start mysqld
      HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64

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

    • Did you pick the same shared folder as before? I forgot to mention I would create a new shared folder in case any problem causing files were still in that folder.

      I doubt fs2ram caused any problems. I have mysql and fs2ram working on same server.
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.7
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • Using the old shared folder may have messed things up. I would go through my steps again with another new shared folder. This whole problem is why we are thinking about removing the database location from the plugin.
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.7
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • I went back through all steps with a new share folder (and my old one deleted) but the issue of the enable failed was the same
      syslog says

      Source Code

      1. ​Mar 13 19:13:24 omv mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
      2. Mar 13 19:13:30 omv /etc/init.d/mysql[9081]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
      3. Mar 13 19:13:30 omv /etc/init.d/mysql[9081]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
      4. Mar 13 19:13:30 omv /etc/init.d/mysql[9081]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
      5. Mar 13 19:13:30 omv /etc/init.d/mysql[9081]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
      6. Mar 13 19:13:30 omv /etc/init.d/mysql[9081]:


      I may have to rebuild this server from scratch, darn.
      HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64
    • Uninstall everything again using instructions. Then install just mysql from command line - apt-get install mysql-server. Install plugin from OMV web interface. Let me know if that works.
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.7
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • Same error on enable

      Source Code

      1. ​Error #4000:
      2. exception 'OMVException' with message 'Failed to execute command 'export LANG=C; invoke-rc.d 'mysql' start 2>&1': Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
      3. invoke-rc.d: initscript mysql, action "start" failed.' in /usr/share/php/openmediavault/initscript.inc:176
      4. Stack trace:



      tail of syslog

      Source Code

      1. Mar 13 20:31:37 omv mysqld: 150313 20:31:37 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only
      2. Mar 13 20:31:38 omv mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
      3. Mar 13 20:31:44 omv /etc/init.d/mysql[10627]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
      4. Mar 13 20:31:44 omv /etc/init.d/mysql[10627]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
      5. Mar 13 20:31:44 omv /etc/init.d/mysql[10627]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
      6. Mar 13 20:31:44 omv /etc/init.d/mysql[10627]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
      7. Mar 13 20:31:44 omv /etc/init.d/mysql[10627]:​


      That is also with a new clean share and installing from the command line using pw:openmediavault
      HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64
    • If I purge, create a new clean share, reboot and remove user mysql.
      Then apt-get install mysql-server I get a working mysql.
      but when I install the plugin and pick just the data share (not enable) and click save I get an "error has occurred" in the web gui.

      So Its moving the files that is causing the error.

      Note: after the move I get
      s -lart
      total 12
      drwxrwsr-x+ 2 root users 4096 Mar 14 10:05 .
      drwxrwx---+ 32 www-data www-data 4096 Mar 14 10:05 ..

      In the mysqldb directory
      HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64
    • That share has wrong permissions and polluted with ACL (the plus sign after permission mode)

      Just create a share without ACL on the root of the data drive. If it has root:users permissions, chown mysql:users -R db_folder the select it with mysql and start again the service.
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server

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

    • I've created a share without ACL on the root data drive and re installed mysql as outlined earlier.
      Even with this I still get

      Source Code

      1. ​Mar 14 12:17:02 omv mysqld: 150314 12:17:02 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
      2. Mar 14 12:17:02 omv mysqld: 150314 12:17:02 [Note] - '127.0.0.1' resolves to '127.0.0.1';
      3. Mar 14 12:17:02 omv mysqld: 150314 12:17:02 [Note] Server socket created on IP: '127.0.0.1'.
      4. Mar 14 12:17:02 omv mysqld: 150314 12:17:02 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only
      5. Mar 14 12:17:02 omv mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
      6. Mar 14 12:17:15 omv /etc/init.d/mysql[11476]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
      7. Mar 14 12:17:15 omv /etc/init.d/mysql[11476]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
      8. Mar 14 12:17:15 omv /etc/init.d/mysql[11476]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
      9. Mar 14 12:17:15 omv /etc/init.d/mysql[11476]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
      10. Mar 14 12:17:15 omv /etc/init.d/mysql[11476]:


      When I try and start the service.
      HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64
    • I followed Eddys guide to removing mysql from this thread pointed to by tekkb (thanks)

      Before installing the mysql plugin the mysql share (newly created) is ls -lart

      Source Code

      1. drwxr-sr-x 2 root users 4096 Mar 14 14:46 .
      2. drwxrws--- 32 root users 4096 Mar 14 14:46 ..


      Now when setting the plugin to the share (not enable) I get a message that an error has occurred
      and no files are placed in the share
      HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64
    • Cleanly reinstalled
      share newly made

      Source Code

      1. ​drwxr-sr-x 2 mysql users 4096 Mar 14 15:18 .
      2. drwxrws--- 32 root users 4096 Mar 14 15:18 ..

      ownership/perms set

      mysql plugin installed from the web interface (installs cleanly and stop/starts the service fine)

      set bind to 0.0.0.0 and data directory to share (with perms/owner) but not setting enable, this now executes with no error

      set enable and save :

      Source Code

      1. ​Error #4000:
      2. exception 'OMVException' with message 'Failed to execute command 'export LANG=C; invoke-rc.d 'mysql' start 2>&1': Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
      3. invoke-rc.d: initscript mysql, action "start" failed.' in /usr/share/php/openmediavault/initscript.inc:176
      4. Stack trace:
      5. #0 /usr/share/php/openmediavault/initscript.inc(141): OMVSysVInitScript->invoke('start')
      6. #1 /usr/share/php/openmediavault/initscript.inc(61): OMVSysVInitScript->start()
      7. #2 /usr/share/openmediavault/engined/module/mysql.inc(117): OMVSysVInitScript->exec()
      8. #3 /usr/share/openmediavault/engined/rpc/config.inc(206): OMVModuleMySQL->startService()
      9. #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      10. #5 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      11. #6 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      12. #7 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      13. #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      14. #9 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      15. #10 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      16. #11 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      17. #12 {main}
      Display All


      Tail of syslog

      Source Code

      1. ​Mar 14 15:34:06 omv mysqld: 150314 15:34:06 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
      2. Mar 14 15:34:06 omv mysqld: 150314 15:34:06 [Note] - '0.0.0.0' resolves to '0.0.0.0';
      3. Mar 14 15:34:06 omv mysqld: 150314 15:34:06 [Note] Server socket created on IP: '0.0.0.0'.
      4. Mar 14 15:34:06 omv mysqld: 150314 15:34:06 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only
      5. Mar 14 15:34:07 omv mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
      6. Mar 14 15:34:19 omv /etc/init.d/mysql[9897]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
      7. Mar 14 15:34:19 omv /etc/init.d/mysql[9897]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
      8. Mar 14 15:34:19 omv /etc/init.d/mysql[9897]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
      9. Mar 14 15:34:19 omv /etc/init.d/mysql[9897]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
      10. Mar 14 15:34:19 omv /etc/init.d/mysql[9897]:


      Same as before.

      Note: I have noticed that plexmediaserver has stopped working and when I try a reinstall that also fails (no errors given), not sure if it is related (but thats another service with a moved data directory)...

      P.S. thanks for the help
      HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64
    • stewski wrote:

      drwxrws--- 32 root users 4096 Mar 14 15:18 ..


      That is the directory above the mysql folder, why is 770!!? Nobody other than root and users can see directories in the uuid mounted path. That leaves out any other service including plex to read at least contents there.

      The default mount path is always root:root 755, change the permission of the mount path where mysql is located. Don't do it recursively

      chmod 775 /media/uuid or chmod 755 /media/uuid/
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server