After duplicating failing drive, mysql and mariadb refuse to run

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I had a hard drive that was failing, and cloned the disk to keep my server running. I noticed mysql wouldn't run, and tried to purge mysql, tried to install mariadb, tried purging that and reinstalling multiple times. It appears as though mysql/mariadb install just fine, but now I keep getting this failure:



Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mariadb.service - MariaDB 10.2.14 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Fri 2018-04-13 09:12:43 MDT; 10ms ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 22033 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 21876 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 21870 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 21865 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 22033 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"

Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [Note] Plugin 'FEEDBACK' is disabled.
Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] mysqld: File '/var/log/mysql/mariadb-bin.000008' not found (Errcode: 2 "No ...directory")
Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Failed to open log (file '/var/log/mysql/mariadb-bin.000008', errno 2)
Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Could not open log file
Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Can't init tc log
Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Aborting
Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Apr 13 09:12:43 SSDUbuntuServer systemd[1]: Failed to start MariaDB 10.2.14 database server.
Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Unit entered failed state.
Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package mariadb-server-10.2 (--configure):
subprocess installed post-installation script returned error exit status 1


I'd love to get my database running again, but can't figure out why it won't start. I've purged and reinstalled both mysql and maria multiple times, and both give this same error.



Thanks!



edit



After giving write access to the log dirs above, I get



Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331412616960 [Note] InnoDB: FTS optimize thread exiting.
Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140332290479872 [Note] Event Scheduler: Purging the queue. 0 events
Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140332290479872 [Note] InnoDB: Starting shutdown...
Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331370653440 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331370653440 [Note] InnoDB: Buffer pool(s) dump completed at 180413 11:06:02
Apr 13 11:06:03 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:03 140332290479872 [Note] InnoDB: Shutdown completed; log sequence number 1620101
Apr 13 11:06:03 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:03 140332290479872 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"









share|improve this question



























    up vote
    0
    down vote

    favorite












    I had a hard drive that was failing, and cloned the disk to keep my server running. I noticed mysql wouldn't run, and tried to purge mysql, tried to install mariadb, tried purging that and reinstalling multiple times. It appears as though mysql/mariadb install just fine, but now I keep getting this failure:



    Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
    invoke-rc.d: initscript mysql, action "start" failed.
    ● mariadb.service - MariaDB 10.2.14 database server
    Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/mariadb.service.d
    └─migrated-from-my.cnf-settings.conf
    Active: failed (Result: exit-code) since Fri 2018-04-13 09:12:43 MDT; 10ms ago
    Docs: man:mysqld(8)
    https://mariadb.com/kb/en/library/systemd/
    Process: 22033 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
    Process: 21876 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
    Process: 21870 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 21865 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Main PID: 22033 (code=exited, status=1/FAILURE)
    Status: "MariaDB server is down"

    Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [Note] Plugin 'FEEDBACK' is disabled.
    Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] mysqld: File '/var/log/mysql/mariadb-bin.000008' not found (Errcode: 2 "No ...directory")
    Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Failed to open log (file '/var/log/mysql/mariadb-bin.000008', errno 2)
    Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Could not open log file
    Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Can't init tc log
    Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Aborting
    Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
    Apr 13 09:12:43 SSDUbuntuServer systemd[1]: Failed to start MariaDB 10.2.14 database server.
    Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Unit entered failed state.
    Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Failed with result 'exit-code'.
    Hint: Some lines were ellipsized, use -l to show in full.
    dpkg: error processing package mariadb-server-10.2 (--configure):
    subprocess installed post-installation script returned error exit status 1


    I'd love to get my database running again, but can't figure out why it won't start. I've purged and reinstalled both mysql and maria multiple times, and both give this same error.



    Thanks!



    edit



    After giving write access to the log dirs above, I get



    Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331412616960 [Note] InnoDB: FTS optimize thread exiting.
    Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140332290479872 [Note] Event Scheduler: Purging the queue. 0 events
    Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140332290479872 [Note] InnoDB: Starting shutdown...
    Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331370653440 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
    Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331370653440 [Note] InnoDB: Buffer pool(s) dump completed at 180413 11:06:02
    Apr 13 11:06:03 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:03 140332290479872 [Note] InnoDB: Shutdown completed; log sequence number 1620101
    Apr 13 11:06:03 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:03 140332290479872 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"









    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I had a hard drive that was failing, and cloned the disk to keep my server running. I noticed mysql wouldn't run, and tried to purge mysql, tried to install mariadb, tried purging that and reinstalling multiple times. It appears as though mysql/mariadb install just fine, but now I keep getting this failure:



      Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
      invoke-rc.d: initscript mysql, action "start" failed.
      ● mariadb.service - MariaDB 10.2.14 database server
      Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
      Drop-In: /etc/systemd/system/mariadb.service.d
      └─migrated-from-my.cnf-settings.conf
      Active: failed (Result: exit-code) since Fri 2018-04-13 09:12:43 MDT; 10ms ago
      Docs: man:mysqld(8)
      https://mariadb.com/kb/en/library/systemd/
      Process: 22033 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
      Process: 21876 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
      Process: 21870 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
      Process: 21865 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
      Main PID: 22033 (code=exited, status=1/FAILURE)
      Status: "MariaDB server is down"

      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [Note] Plugin 'FEEDBACK' is disabled.
      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] mysqld: File '/var/log/mysql/mariadb-bin.000008' not found (Errcode: 2 "No ...directory")
      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Failed to open log (file '/var/log/mysql/mariadb-bin.000008', errno 2)
      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Could not open log file
      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Can't init tc log
      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Aborting
      Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
      Apr 13 09:12:43 SSDUbuntuServer systemd[1]: Failed to start MariaDB 10.2.14 database server.
      Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Unit entered failed state.
      Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Failed with result 'exit-code'.
      Hint: Some lines were ellipsized, use -l to show in full.
      dpkg: error processing package mariadb-server-10.2 (--configure):
      subprocess installed post-installation script returned error exit status 1


      I'd love to get my database running again, but can't figure out why it won't start. I've purged and reinstalled both mysql and maria multiple times, and both give this same error.



      Thanks!



      edit



      After giving write access to the log dirs above, I get



      Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331412616960 [Note] InnoDB: FTS optimize thread exiting.
      Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140332290479872 [Note] Event Scheduler: Purging the queue. 0 events
      Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140332290479872 [Note] InnoDB: Starting shutdown...
      Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331370653440 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
      Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331370653440 [Note] InnoDB: Buffer pool(s) dump completed at 180413 11:06:02
      Apr 13 11:06:03 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:03 140332290479872 [Note] InnoDB: Shutdown completed; log sequence number 1620101
      Apr 13 11:06:03 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:03 140332290479872 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"









      share|improve this question















      I had a hard drive that was failing, and cloned the disk to keep my server running. I noticed mysql wouldn't run, and tried to purge mysql, tried to install mariadb, tried purging that and reinstalling multiple times. It appears as though mysql/mariadb install just fine, but now I keep getting this failure:



      Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
      invoke-rc.d: initscript mysql, action "start" failed.
      ● mariadb.service - MariaDB 10.2.14 database server
      Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
      Drop-In: /etc/systemd/system/mariadb.service.d
      └─migrated-from-my.cnf-settings.conf
      Active: failed (Result: exit-code) since Fri 2018-04-13 09:12:43 MDT; 10ms ago
      Docs: man:mysqld(8)
      https://mariadb.com/kb/en/library/systemd/
      Process: 22033 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
      Process: 21876 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
      Process: 21870 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
      Process: 21865 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
      Main PID: 22033 (code=exited, status=1/FAILURE)
      Status: "MariaDB server is down"

      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [Note] Plugin 'FEEDBACK' is disabled.
      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] mysqld: File '/var/log/mysql/mariadb-bin.000008' not found (Errcode: 2 "No ...directory")
      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Failed to open log (file '/var/log/mysql/mariadb-bin.000008', errno 2)
      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Could not open log file
      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Can't init tc log
      Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Aborting
      Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
      Apr 13 09:12:43 SSDUbuntuServer systemd[1]: Failed to start MariaDB 10.2.14 database server.
      Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Unit entered failed state.
      Apr 13 09:12:43 SSDUbuntuServer systemd[1]: mariadb.service: Failed with result 'exit-code'.
      Hint: Some lines were ellipsized, use -l to show in full.
      dpkg: error processing package mariadb-server-10.2 (--configure):
      subprocess installed post-installation script returned error exit status 1


      I'd love to get my database running again, but can't figure out why it won't start. I've purged and reinstalled both mysql and maria multiple times, and both give this same error.



      Thanks!



      edit



      After giving write access to the log dirs above, I get



      Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331412616960 [Note] InnoDB: FTS optimize thread exiting.
      Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140332290479872 [Note] Event Scheduler: Purging the queue. 0 events
      Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140332290479872 [Note] InnoDB: Starting shutdown...
      Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331370653440 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
      Apr 13 11:06:02 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:02 140331370653440 [Note] InnoDB: Buffer pool(s) dump completed at 180413 11:06:02
      Apr 13 11:06:03 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:03 140332290479872 [Note] InnoDB: Shutdown completed; log sequence number 1620101
      Apr 13 11:06:03 SSDUbuntuServer mysqld[8060]: 2018-04-13 11:06:03 140332290479872 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"






      16.04 server mysql mariadb






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 13 at 17:08

























      asked Apr 13 at 15:19









      richie

      826




      826




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote













          How was your drives setup before cloning? the lines



          Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [Note] Plugin 'FEEDBACK' is disabled.
          Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] mysqld: File '/var/log/mysql/mariadb-bin.000008' not found (Errcode: 2 "No ...directory")
          Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Failed to open log (file '/var/log/mysql/mariadb-bin.000008', errno 2)
          Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Could not open log file
          Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Can't init tc log


          Indicate that either the process is not finding the log dir or it doesn't have permissions to access whats already there. Try listing the /var/log/mysql/ directory first to see if there's anything there.






          share|improve this answer
















          • 1




            I fixed the access to the logs, I still get errors (see my edit). The drive was just a single ssd that was cloned using dd. It copied over just fine, but mysql refused to start up after switching to the new drive.
            – richie
            Apr 13 at 17:09











          • Ok, it would help if you show the entire output but off the top it looks like you may need to purge the binlogs look at mariadb.com/kb/en/library/sql-commands-purge-logs and mariadb.com/kb/en/library/mysqld_safe (you will have to start the database in safe mode).
            – CheesyMacHack
            Apr 13 at 19:48










          • Hmm. It says there's nothing to clear, but starting with mysqld_safe works. Let me try to get the entire log
            – richie
            Apr 13 at 20:19










          • Looks like it's crashing on a mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory or after touching a file, and setting permissions I get mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: Exec format error
            – richie
            Apr 13 at 20:33











          • Looks to me like you could extract that file from the mariadb package, here's a similar issue unix.stackexchange.com/questions/421366/…
            – CheesyMacHack
            Apr 15 at 15:33

















          up vote
          0
          down vote













          After more research, I found that /etc/mysql/debian-start was missing, and causing the failures. I created the file, and populated its contents with this version from mariadb and it all worked.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1024695%2fafter-duplicating-failing-drive-mysql-and-mariadb-refuse-to-run%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            How was your drives setup before cloning? the lines



            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [Note] Plugin 'FEEDBACK' is disabled.
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] mysqld: File '/var/log/mysql/mariadb-bin.000008' not found (Errcode: 2 "No ...directory")
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Failed to open log (file '/var/log/mysql/mariadb-bin.000008', errno 2)
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Could not open log file
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Can't init tc log


            Indicate that either the process is not finding the log dir or it doesn't have permissions to access whats already there. Try listing the /var/log/mysql/ directory first to see if there's anything there.






            share|improve this answer
















            • 1




              I fixed the access to the logs, I still get errors (see my edit). The drive was just a single ssd that was cloned using dd. It copied over just fine, but mysql refused to start up after switching to the new drive.
              – richie
              Apr 13 at 17:09











            • Ok, it would help if you show the entire output but off the top it looks like you may need to purge the binlogs look at mariadb.com/kb/en/library/sql-commands-purge-logs and mariadb.com/kb/en/library/mysqld_safe (you will have to start the database in safe mode).
              – CheesyMacHack
              Apr 13 at 19:48










            • Hmm. It says there's nothing to clear, but starting with mysqld_safe works. Let me try to get the entire log
              – richie
              Apr 13 at 20:19










            • Looks like it's crashing on a mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory or after touching a file, and setting permissions I get mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: Exec format error
              – richie
              Apr 13 at 20:33











            • Looks to me like you could extract that file from the mariadb package, here's a similar issue unix.stackexchange.com/questions/421366/…
              – CheesyMacHack
              Apr 15 at 15:33














            up vote
            0
            down vote













            How was your drives setup before cloning? the lines



            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [Note] Plugin 'FEEDBACK' is disabled.
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] mysqld: File '/var/log/mysql/mariadb-bin.000008' not found (Errcode: 2 "No ...directory")
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Failed to open log (file '/var/log/mysql/mariadb-bin.000008', errno 2)
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Could not open log file
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Can't init tc log


            Indicate that either the process is not finding the log dir or it doesn't have permissions to access whats already there. Try listing the /var/log/mysql/ directory first to see if there's anything there.






            share|improve this answer
















            • 1




              I fixed the access to the logs, I still get errors (see my edit). The drive was just a single ssd that was cloned using dd. It copied over just fine, but mysql refused to start up after switching to the new drive.
              – richie
              Apr 13 at 17:09











            • Ok, it would help if you show the entire output but off the top it looks like you may need to purge the binlogs look at mariadb.com/kb/en/library/sql-commands-purge-logs and mariadb.com/kb/en/library/mysqld_safe (you will have to start the database in safe mode).
              – CheesyMacHack
              Apr 13 at 19:48










            • Hmm. It says there's nothing to clear, but starting with mysqld_safe works. Let me try to get the entire log
              – richie
              Apr 13 at 20:19










            • Looks like it's crashing on a mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory or after touching a file, and setting permissions I get mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: Exec format error
              – richie
              Apr 13 at 20:33











            • Looks to me like you could extract that file from the mariadb package, here's a similar issue unix.stackexchange.com/questions/421366/…
              – CheesyMacHack
              Apr 15 at 15:33












            up vote
            0
            down vote










            up vote
            0
            down vote









            How was your drives setup before cloning? the lines



            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [Note] Plugin 'FEEDBACK' is disabled.
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] mysqld: File '/var/log/mysql/mariadb-bin.000008' not found (Errcode: 2 "No ...directory")
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Failed to open log (file '/var/log/mysql/mariadb-bin.000008', errno 2)
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Could not open log file
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Can't init tc log


            Indicate that either the process is not finding the log dir or it doesn't have permissions to access whats already there. Try listing the /var/log/mysql/ directory first to see if there's anything there.






            share|improve this answer












            How was your drives setup before cloning? the lines



            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [Note] Plugin 'FEEDBACK' is disabled.
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] mysqld: File '/var/log/mysql/mariadb-bin.000008' not found (Errcode: 2 "No ...directory")
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Failed to open log (file '/var/log/mysql/mariadb-bin.000008', errno 2)
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Could not open log file
            Apr 13 09:12:41 SSDUbuntuServer mysqld[22033]: 2018-04-13 9:12:41 140424825977024 [ERROR] Can't init tc log


            Indicate that either the process is not finding the log dir or it doesn't have permissions to access whats already there. Try listing the /var/log/mysql/ directory first to see if there's anything there.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 13 at 15:53









            CheesyMacHack

            1




            1







            • 1




              I fixed the access to the logs, I still get errors (see my edit). The drive was just a single ssd that was cloned using dd. It copied over just fine, but mysql refused to start up after switching to the new drive.
              – richie
              Apr 13 at 17:09











            • Ok, it would help if you show the entire output but off the top it looks like you may need to purge the binlogs look at mariadb.com/kb/en/library/sql-commands-purge-logs and mariadb.com/kb/en/library/mysqld_safe (you will have to start the database in safe mode).
              – CheesyMacHack
              Apr 13 at 19:48










            • Hmm. It says there's nothing to clear, but starting with mysqld_safe works. Let me try to get the entire log
              – richie
              Apr 13 at 20:19










            • Looks like it's crashing on a mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory or after touching a file, and setting permissions I get mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: Exec format error
              – richie
              Apr 13 at 20:33











            • Looks to me like you could extract that file from the mariadb package, here's a similar issue unix.stackexchange.com/questions/421366/…
              – CheesyMacHack
              Apr 15 at 15:33












            • 1




              I fixed the access to the logs, I still get errors (see my edit). The drive was just a single ssd that was cloned using dd. It copied over just fine, but mysql refused to start up after switching to the new drive.
              – richie
              Apr 13 at 17:09











            • Ok, it would help if you show the entire output but off the top it looks like you may need to purge the binlogs look at mariadb.com/kb/en/library/sql-commands-purge-logs and mariadb.com/kb/en/library/mysqld_safe (you will have to start the database in safe mode).
              – CheesyMacHack
              Apr 13 at 19:48










            • Hmm. It says there's nothing to clear, but starting with mysqld_safe works. Let me try to get the entire log
              – richie
              Apr 13 at 20:19










            • Looks like it's crashing on a mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory or after touching a file, and setting permissions I get mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: Exec format error
              – richie
              Apr 13 at 20:33











            • Looks to me like you could extract that file from the mariadb package, here's a similar issue unix.stackexchange.com/questions/421366/…
              – CheesyMacHack
              Apr 15 at 15:33







            1




            1




            I fixed the access to the logs, I still get errors (see my edit). The drive was just a single ssd that was cloned using dd. It copied over just fine, but mysql refused to start up after switching to the new drive.
            – richie
            Apr 13 at 17:09





            I fixed the access to the logs, I still get errors (see my edit). The drive was just a single ssd that was cloned using dd. It copied over just fine, but mysql refused to start up after switching to the new drive.
            – richie
            Apr 13 at 17:09













            Ok, it would help if you show the entire output but off the top it looks like you may need to purge the binlogs look at mariadb.com/kb/en/library/sql-commands-purge-logs and mariadb.com/kb/en/library/mysqld_safe (you will have to start the database in safe mode).
            – CheesyMacHack
            Apr 13 at 19:48




            Ok, it would help if you show the entire output but off the top it looks like you may need to purge the binlogs look at mariadb.com/kb/en/library/sql-commands-purge-logs and mariadb.com/kb/en/library/mysqld_safe (you will have to start the database in safe mode).
            – CheesyMacHack
            Apr 13 at 19:48












            Hmm. It says there's nothing to clear, but starting with mysqld_safe works. Let me try to get the entire log
            – richie
            Apr 13 at 20:19




            Hmm. It says there's nothing to clear, but starting with mysqld_safe works. Let me try to get the entire log
            – richie
            Apr 13 at 20:19












            Looks like it's crashing on a mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory or after touching a file, and setting permissions I get mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: Exec format error
            – richie
            Apr 13 at 20:33





            Looks like it's crashing on a mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory or after touching a file, and setting permissions I get mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: Exec format error
            – richie
            Apr 13 at 20:33













            Looks to me like you could extract that file from the mariadb package, here's a similar issue unix.stackexchange.com/questions/421366/…
            – CheesyMacHack
            Apr 15 at 15:33




            Looks to me like you could extract that file from the mariadb package, here's a similar issue unix.stackexchange.com/questions/421366/…
            – CheesyMacHack
            Apr 15 at 15:33












            up vote
            0
            down vote













            After more research, I found that /etc/mysql/debian-start was missing, and causing the failures. I created the file, and populated its contents with this version from mariadb and it all worked.






            share|improve this answer
























              up vote
              0
              down vote













              After more research, I found that /etc/mysql/debian-start was missing, and causing the failures. I created the file, and populated its contents with this version from mariadb and it all worked.






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                After more research, I found that /etc/mysql/debian-start was missing, and causing the failures. I created the file, and populated its contents with this version from mariadb and it all worked.






                share|improve this answer












                After more research, I found that /etc/mysql/debian-start was missing, and causing the failures. I created the file, and populated its contents with this version from mariadb and it all worked.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 13 at 20:39









                richie

                826




                826



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1024695%2fafter-duplicating-failing-drive-mysql-and-mariadb-refuse-to-run%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491