Mariadb loads, but crashes after a couple of minutes. Happened after server was restored from a “snapshot”How do I repair an InnoDB table?mysql server detailed logenabling event scheduler causes mysql silent failureError running python script with mysql triggerMySQL issue at boot timeMariadb can't restart|startmariadb/mysql won't start after changing database location moved to external driveMariaDB failed to start after updateUnable to start mysql on EC2 instance, I keep receiving apparmor errorCan't start MySQL on Fedora 29
Notepad++ delete until colon for every line with replace all
GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?
Fair gambler's ruin problem intuition
how do we prove that a sum of two periods is still a period?
What do you call someone who asks many questions?
Does Dispel Magic work on Tiny Hut?
How exploitable/balanced is this homebrew spell: Spell Permanency?
Was the old ablative pronoun "med" or "mēd"?
Could the museum Saturn V's be refitted for one more flight?
What is the opposite of "eschatology"?
How to stretch the corners of this image so that it looks like a perfect rectangle?
Why are UK visa biometrics appointments suspended at USCIS Application Support Centers?
What's the meaning of "Sollensaussagen"?
Avoiding the "not like other girls" trope?
How could indestructible materials be used in power generation?
How to compactly explain secondary and tertiary characters without resorting to stereotypes?
Finding the error in an argument
How to install cross-compiler on Ubuntu 18.04?
Venezuelan girlfriend wants to travel the USA to be with me. What is the process?
How does a refinance allow a mortgage to be repaid?
Why was the shrink from 8″ made only to 5.25″ and not smaller (4″ or less)
Send out email when Apex Queueable fails and test it
Where would I need my direct neural interface to be implanted?
Implication of namely
Mariadb loads, but crashes after a couple of minutes. Happened after server was restored from a “snapshot”
How do I repair an InnoDB table?mysql server detailed logenabling event scheduler causes mysql silent failureError running python script with mysql triggerMySQL issue at boot timeMariadb can't restart|startmariadb/mysql won't start after changing database location moved to external driveMariaDB failed to start after updateUnable to start mysql on EC2 instance, I keep receiving apparmor errorCan't start MySQL on Fedora 29
I have a VPS (Ubuntu Server 18.04) hosted with OVH. They offer snapshots, that are supposed to be able to rollback a VPS to a previous state. I have never used this feature before. But I made a snapshot last night before I started messing with BTCpay. I royally borked that install so I decided to roll back to the snapshot.
Now my Mariadb install isn't working properly. The only thing hosted on the server is Wordpress multisite. If I reboot the server (or start Mariadb with systemctl) it loads and I can access all my wordpress sites, and admin panel. But after a couple of minutes, Mariadb crashes.
Running mysqld_safe --skip-grant-tables outputs:
190308 15:10:20 mysqld_safe Logging to syslog.
190308 15:10:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
This gets Wordpress up and running, but obviously isn't a secure solution.
These are the only errors that show up in /var/log/mysql/error.log but there's only the one entry and they do not repeat each time Mariadb crashes:
2019-03-08 13:08:24 139897840925824 [ERROR] mysqld: Table './mysql/db' is marked as crashed and should be repaired
2019-03-08 13:08:24 139897840925824 [ERROR] mysql.db: 1 client is using or hasn't closed the table properly
and CHECK TABLE mysql.db; outputs:
+----------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------+-------+----------+----------+
| mysql.db | check | status | OK |
+----------+-------+----------+----------+
1 row in set (0.00 sec)
So far the steps I have taken are:
To use mysqldump for the 'wordpress' database, which is the one I
setup for my Wordpress multisite install.Run # mysqlcheck --all-databases which came back all with 'OK'
Tried the fix listed here
https://stackoverflow.com/a/3322930/8644833 after starting Mariadb with mysqld_safe --skip-grant-tables
I am not great with mysql, so I'm just looking for a solution to get me up and running again without losing too much data. I wouldn't mind performing a clean install of Mariadb and setting up a new Wordpress database, but I'm not exactly sure how to back up all of my data so I wouldn't have to rebuild all my sites. Seems like this should be possible as the sites all work fine until Mariadb crashes.
Here is all the other relevant info I have:
dmesg:
[ 108.430534] audit: type=1400 audit(1552073977.631:19): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.534100] audit: type=1400 audit(1552073977.739:20): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.634399] audit: type=1400 audit(1552073977.839:21): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.734779] audit: type=1400 audit(1552073977.939:22): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.835027] audit: type=1400 audit(1552073978.039:23): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w"denied_mask="w" fsuid=111 ouid=0
[ 108.935311] audit: type=1400 audit(1552073978.139:24): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 109.035562] audit: type=1400 audit(1552073978.235:25): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 109.136162] audit: type=1400 audit(1552073978.339:26): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 110.038191] audit: type=1400 audit(1552073979.243:27): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 110.040919] audit: type=1400 audit(1552073979.243:28): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
systemctl status mariadb.service:
● mariadb.service - MariaDB 10.1.38 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Fri 2019-03-08 14:39:39 EST; 14min ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 939 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 839 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: 809 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 770 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 939 (code=exited, status=0/SUCCESS)
Mar 08 14:38:08 mydomain.com systemd[1]: Starting MariaDB 10.1.38 database server...
Mar 08 14:38:09 mydomain.com mysqld[939]: 2019-03-08 14:38:09 140251492867200 [Note] /usr/sbin/mysqld (mysqld 10.1.38-MariaDB-0ubuntu0.18.04.1) starting as process 939 ...
Mar 08 14:39:37 mydomain.com systemd[1]: mariadb.service: Start operation timed out. Terminating.
Mar 08 14:39:39 mydomain.com systemd[1]: mariadb.service: Failed with result 'timeout'.
Mar 08 14:39:39 mydomain.com systemd[1]: Failed to start MariaDB 10.1.38 database server.
mysql log:
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: innodb_empty_free_list_algor
ithm has been changed to legacy because of small buffer pool size. In order to
use backoff, increase buffer pool at least up to 20MB.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using mutexes to ref count b
uffer pool pages
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: The InnoDB memory heap is disabled
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using Linux native AIO
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using SSE crc32 instructions
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Completed initialization of buffer pool
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Highest supported file format is Barracuda.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: 128 rollback segment(s) are active.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Waiting for purge to start
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.42-84.2 started; log sequence number 446057526
2019-03-08 14:59:39 140597857991808 [Note] Plugin 'FEEDBACK' is disabled.
2019-03-08 14:59:39 140597201463040 [Note] InnoDB: Dumping buffer pool(s) not yet started
2019-03-08 14:59:39 140597857991808 [Note] Server socket created on IP: '127.0.0.1'.
2019-03-08 14:59:39 140597857991808 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.38-MariaDB-0ubuntu0.18.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Ubuntu 18.04
2019-03-08 15:01:09 140597856737024 [Note] /usr/sbin/mysqld: Normal shutdown
2019-03-08 15:01:09 140597856737024 [Note] Event Scheduler: Purging the queue. 0 events
2019-03-08 15:01:09 140597251774208 [Note] InnoDB: FTS optimize thread exiting.
2019-03-08 15:01:09 140597856737024 [Note] InnoDB: Starting shutdown...
2019-03-08 15:01:09 140597856737024 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
2019-03-08 15:01:11 140597856737024 [Note] InnoDB: Shutdown completed; log sequence number 446281568
2019-03-08 15:01:11 140597856737024 [Note] /usr/sbin/mysqld: Shutdown complete
mysql wordpress ubuntu mariadb vps
add a comment |
I have a VPS (Ubuntu Server 18.04) hosted with OVH. They offer snapshots, that are supposed to be able to rollback a VPS to a previous state. I have never used this feature before. But I made a snapshot last night before I started messing with BTCpay. I royally borked that install so I decided to roll back to the snapshot.
Now my Mariadb install isn't working properly. The only thing hosted on the server is Wordpress multisite. If I reboot the server (or start Mariadb with systemctl) it loads and I can access all my wordpress sites, and admin panel. But after a couple of minutes, Mariadb crashes.
Running mysqld_safe --skip-grant-tables outputs:
190308 15:10:20 mysqld_safe Logging to syslog.
190308 15:10:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
This gets Wordpress up and running, but obviously isn't a secure solution.
These are the only errors that show up in /var/log/mysql/error.log but there's only the one entry and they do not repeat each time Mariadb crashes:
2019-03-08 13:08:24 139897840925824 [ERROR] mysqld: Table './mysql/db' is marked as crashed and should be repaired
2019-03-08 13:08:24 139897840925824 [ERROR] mysql.db: 1 client is using or hasn't closed the table properly
and CHECK TABLE mysql.db; outputs:
+----------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------+-------+----------+----------+
| mysql.db | check | status | OK |
+----------+-------+----------+----------+
1 row in set (0.00 sec)
So far the steps I have taken are:
To use mysqldump for the 'wordpress' database, which is the one I
setup for my Wordpress multisite install.Run # mysqlcheck --all-databases which came back all with 'OK'
Tried the fix listed here
https://stackoverflow.com/a/3322930/8644833 after starting Mariadb with mysqld_safe --skip-grant-tables
I am not great with mysql, so I'm just looking for a solution to get me up and running again without losing too much data. I wouldn't mind performing a clean install of Mariadb and setting up a new Wordpress database, but I'm not exactly sure how to back up all of my data so I wouldn't have to rebuild all my sites. Seems like this should be possible as the sites all work fine until Mariadb crashes.
Here is all the other relevant info I have:
dmesg:
[ 108.430534] audit: type=1400 audit(1552073977.631:19): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.534100] audit: type=1400 audit(1552073977.739:20): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.634399] audit: type=1400 audit(1552073977.839:21): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.734779] audit: type=1400 audit(1552073977.939:22): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.835027] audit: type=1400 audit(1552073978.039:23): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w"denied_mask="w" fsuid=111 ouid=0
[ 108.935311] audit: type=1400 audit(1552073978.139:24): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 109.035562] audit: type=1400 audit(1552073978.235:25): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 109.136162] audit: type=1400 audit(1552073978.339:26): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 110.038191] audit: type=1400 audit(1552073979.243:27): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 110.040919] audit: type=1400 audit(1552073979.243:28): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
systemctl status mariadb.service:
● mariadb.service - MariaDB 10.1.38 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Fri 2019-03-08 14:39:39 EST; 14min ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 939 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 839 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: 809 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 770 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 939 (code=exited, status=0/SUCCESS)
Mar 08 14:38:08 mydomain.com systemd[1]: Starting MariaDB 10.1.38 database server...
Mar 08 14:38:09 mydomain.com mysqld[939]: 2019-03-08 14:38:09 140251492867200 [Note] /usr/sbin/mysqld (mysqld 10.1.38-MariaDB-0ubuntu0.18.04.1) starting as process 939 ...
Mar 08 14:39:37 mydomain.com systemd[1]: mariadb.service: Start operation timed out. Terminating.
Mar 08 14:39:39 mydomain.com systemd[1]: mariadb.service: Failed with result 'timeout'.
Mar 08 14:39:39 mydomain.com systemd[1]: Failed to start MariaDB 10.1.38 database server.
mysql log:
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: innodb_empty_free_list_algor
ithm has been changed to legacy because of small buffer pool size. In order to
use backoff, increase buffer pool at least up to 20MB.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using mutexes to ref count b
uffer pool pages
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: The InnoDB memory heap is disabled
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using Linux native AIO
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using SSE crc32 instructions
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Completed initialization of buffer pool
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Highest supported file format is Barracuda.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: 128 rollback segment(s) are active.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Waiting for purge to start
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.42-84.2 started; log sequence number 446057526
2019-03-08 14:59:39 140597857991808 [Note] Plugin 'FEEDBACK' is disabled.
2019-03-08 14:59:39 140597201463040 [Note] InnoDB: Dumping buffer pool(s) not yet started
2019-03-08 14:59:39 140597857991808 [Note] Server socket created on IP: '127.0.0.1'.
2019-03-08 14:59:39 140597857991808 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.38-MariaDB-0ubuntu0.18.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Ubuntu 18.04
2019-03-08 15:01:09 140597856737024 [Note] /usr/sbin/mysqld: Normal shutdown
2019-03-08 15:01:09 140597856737024 [Note] Event Scheduler: Purging the queue. 0 events
2019-03-08 15:01:09 140597251774208 [Note] InnoDB: FTS optimize thread exiting.
2019-03-08 15:01:09 140597856737024 [Note] InnoDB: Starting shutdown...
2019-03-08 15:01:09 140597856737024 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
2019-03-08 15:01:11 140597856737024 [Note] InnoDB: Shutdown completed; log sequence number 446281568
2019-03-08 15:01:11 140597856737024 [Note] /usr/sbin/mysqld: Shutdown complete
mysql wordpress ubuntu mariadb vps
add a comment |
I have a VPS (Ubuntu Server 18.04) hosted with OVH. They offer snapshots, that are supposed to be able to rollback a VPS to a previous state. I have never used this feature before. But I made a snapshot last night before I started messing with BTCpay. I royally borked that install so I decided to roll back to the snapshot.
Now my Mariadb install isn't working properly. The only thing hosted on the server is Wordpress multisite. If I reboot the server (or start Mariadb with systemctl) it loads and I can access all my wordpress sites, and admin panel. But after a couple of minutes, Mariadb crashes.
Running mysqld_safe --skip-grant-tables outputs:
190308 15:10:20 mysqld_safe Logging to syslog.
190308 15:10:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
This gets Wordpress up and running, but obviously isn't a secure solution.
These are the only errors that show up in /var/log/mysql/error.log but there's only the one entry and they do not repeat each time Mariadb crashes:
2019-03-08 13:08:24 139897840925824 [ERROR] mysqld: Table './mysql/db' is marked as crashed and should be repaired
2019-03-08 13:08:24 139897840925824 [ERROR] mysql.db: 1 client is using or hasn't closed the table properly
and CHECK TABLE mysql.db; outputs:
+----------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------+-------+----------+----------+
| mysql.db | check | status | OK |
+----------+-------+----------+----------+
1 row in set (0.00 sec)
So far the steps I have taken are:
To use mysqldump for the 'wordpress' database, which is the one I
setup for my Wordpress multisite install.Run # mysqlcheck --all-databases which came back all with 'OK'
Tried the fix listed here
https://stackoverflow.com/a/3322930/8644833 after starting Mariadb with mysqld_safe --skip-grant-tables
I am not great with mysql, so I'm just looking for a solution to get me up and running again without losing too much data. I wouldn't mind performing a clean install of Mariadb and setting up a new Wordpress database, but I'm not exactly sure how to back up all of my data so I wouldn't have to rebuild all my sites. Seems like this should be possible as the sites all work fine until Mariadb crashes.
Here is all the other relevant info I have:
dmesg:
[ 108.430534] audit: type=1400 audit(1552073977.631:19): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.534100] audit: type=1400 audit(1552073977.739:20): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.634399] audit: type=1400 audit(1552073977.839:21): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.734779] audit: type=1400 audit(1552073977.939:22): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.835027] audit: type=1400 audit(1552073978.039:23): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w"denied_mask="w" fsuid=111 ouid=0
[ 108.935311] audit: type=1400 audit(1552073978.139:24): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 109.035562] audit: type=1400 audit(1552073978.235:25): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 109.136162] audit: type=1400 audit(1552073978.339:26): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 110.038191] audit: type=1400 audit(1552073979.243:27): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 110.040919] audit: type=1400 audit(1552073979.243:28): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
systemctl status mariadb.service:
● mariadb.service - MariaDB 10.1.38 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Fri 2019-03-08 14:39:39 EST; 14min ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 939 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 839 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: 809 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 770 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 939 (code=exited, status=0/SUCCESS)
Mar 08 14:38:08 mydomain.com systemd[1]: Starting MariaDB 10.1.38 database server...
Mar 08 14:38:09 mydomain.com mysqld[939]: 2019-03-08 14:38:09 140251492867200 [Note] /usr/sbin/mysqld (mysqld 10.1.38-MariaDB-0ubuntu0.18.04.1) starting as process 939 ...
Mar 08 14:39:37 mydomain.com systemd[1]: mariadb.service: Start operation timed out. Terminating.
Mar 08 14:39:39 mydomain.com systemd[1]: mariadb.service: Failed with result 'timeout'.
Mar 08 14:39:39 mydomain.com systemd[1]: Failed to start MariaDB 10.1.38 database server.
mysql log:
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: innodb_empty_free_list_algor
ithm has been changed to legacy because of small buffer pool size. In order to
use backoff, increase buffer pool at least up to 20MB.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using mutexes to ref count b
uffer pool pages
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: The InnoDB memory heap is disabled
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using Linux native AIO
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using SSE crc32 instructions
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Completed initialization of buffer pool
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Highest supported file format is Barracuda.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: 128 rollback segment(s) are active.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Waiting for purge to start
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.42-84.2 started; log sequence number 446057526
2019-03-08 14:59:39 140597857991808 [Note] Plugin 'FEEDBACK' is disabled.
2019-03-08 14:59:39 140597201463040 [Note] InnoDB: Dumping buffer pool(s) not yet started
2019-03-08 14:59:39 140597857991808 [Note] Server socket created on IP: '127.0.0.1'.
2019-03-08 14:59:39 140597857991808 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.38-MariaDB-0ubuntu0.18.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Ubuntu 18.04
2019-03-08 15:01:09 140597856737024 [Note] /usr/sbin/mysqld: Normal shutdown
2019-03-08 15:01:09 140597856737024 [Note] Event Scheduler: Purging the queue. 0 events
2019-03-08 15:01:09 140597251774208 [Note] InnoDB: FTS optimize thread exiting.
2019-03-08 15:01:09 140597856737024 [Note] InnoDB: Starting shutdown...
2019-03-08 15:01:09 140597856737024 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
2019-03-08 15:01:11 140597856737024 [Note] InnoDB: Shutdown completed; log sequence number 446281568
2019-03-08 15:01:11 140597856737024 [Note] /usr/sbin/mysqld: Shutdown complete
mysql wordpress ubuntu mariadb vps
I have a VPS (Ubuntu Server 18.04) hosted with OVH. They offer snapshots, that are supposed to be able to rollback a VPS to a previous state. I have never used this feature before. But I made a snapshot last night before I started messing with BTCpay. I royally borked that install so I decided to roll back to the snapshot.
Now my Mariadb install isn't working properly. The only thing hosted on the server is Wordpress multisite. If I reboot the server (or start Mariadb with systemctl) it loads and I can access all my wordpress sites, and admin panel. But after a couple of minutes, Mariadb crashes.
Running mysqld_safe --skip-grant-tables outputs:
190308 15:10:20 mysqld_safe Logging to syslog.
190308 15:10:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
This gets Wordpress up and running, but obviously isn't a secure solution.
These are the only errors that show up in /var/log/mysql/error.log but there's only the one entry and they do not repeat each time Mariadb crashes:
2019-03-08 13:08:24 139897840925824 [ERROR] mysqld: Table './mysql/db' is marked as crashed and should be repaired
2019-03-08 13:08:24 139897840925824 [ERROR] mysql.db: 1 client is using or hasn't closed the table properly
and CHECK TABLE mysql.db; outputs:
+----------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------+-------+----------+----------+
| mysql.db | check | status | OK |
+----------+-------+----------+----------+
1 row in set (0.00 sec)
So far the steps I have taken are:
To use mysqldump for the 'wordpress' database, which is the one I
setup for my Wordpress multisite install.Run # mysqlcheck --all-databases which came back all with 'OK'
Tried the fix listed here
https://stackoverflow.com/a/3322930/8644833 after starting Mariadb with mysqld_safe --skip-grant-tables
I am not great with mysql, so I'm just looking for a solution to get me up and running again without losing too much data. I wouldn't mind performing a clean install of Mariadb and setting up a new Wordpress database, but I'm not exactly sure how to back up all of my data so I wouldn't have to rebuild all my sites. Seems like this should be possible as the sites all work fine until Mariadb crashes.
Here is all the other relevant info I have:
dmesg:
[ 108.430534] audit: type=1400 audit(1552073977.631:19): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.534100] audit: type=1400 audit(1552073977.739:20): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.634399] audit: type=1400 audit(1552073977.839:21): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.734779] audit: type=1400 audit(1552073977.939:22): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 108.835027] audit: type=1400 audit(1552073978.039:23): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w"denied_mask="w" fsuid=111 ouid=0
[ 108.935311] audit: type=1400 audit(1552073978.139:24): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 109.035562] audit: type=1400 audit(1552073978.235:25): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 109.136162] audit: type=1400 audit(1552073978.339:26): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 110.038191] audit: type=1400 audit(1552073979.243:27): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
[ 110.040919] audit: type=1400 audit(1552073979.243:28): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=939 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=111 ouid=0
systemctl status mariadb.service:
● mariadb.service - MariaDB 10.1.38 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Fri 2019-03-08 14:39:39 EST; 14min ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 939 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 839 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: 809 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 770 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 939 (code=exited, status=0/SUCCESS)
Mar 08 14:38:08 mydomain.com systemd[1]: Starting MariaDB 10.1.38 database server...
Mar 08 14:38:09 mydomain.com mysqld[939]: 2019-03-08 14:38:09 140251492867200 [Note] /usr/sbin/mysqld (mysqld 10.1.38-MariaDB-0ubuntu0.18.04.1) starting as process 939 ...
Mar 08 14:39:37 mydomain.com systemd[1]: mariadb.service: Start operation timed out. Terminating.
Mar 08 14:39:39 mydomain.com systemd[1]: mariadb.service: Failed with result 'timeout'.
Mar 08 14:39:39 mydomain.com systemd[1]: Failed to start MariaDB 10.1.38 database server.
mysql log:
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: innodb_empty_free_list_algor
ithm has been changed to legacy because of small buffer pool size. In order to
use backoff, increase buffer pool at least up to 20MB.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using mutexes to ref count b
uffer pool pages
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: The InnoDB memory heap is disabled
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using Linux native AIO
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Using SSE crc32 instructions
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Completed initialization of buffer pool
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Highest supported file format is Barracuda.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: 128 rollback segment(s) are active.
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Waiting for purge to start
2019-03-08 14:59:39 140597857991808 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.42-84.2 started; log sequence number 446057526
2019-03-08 14:59:39 140597857991808 [Note] Plugin 'FEEDBACK' is disabled.
2019-03-08 14:59:39 140597201463040 [Note] InnoDB: Dumping buffer pool(s) not yet started
2019-03-08 14:59:39 140597857991808 [Note] Server socket created on IP: '127.0.0.1'.
2019-03-08 14:59:39 140597857991808 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.38-MariaDB-0ubuntu0.18.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Ubuntu 18.04
2019-03-08 15:01:09 140597856737024 [Note] /usr/sbin/mysqld: Normal shutdown
2019-03-08 15:01:09 140597856737024 [Note] Event Scheduler: Purging the queue. 0 events
2019-03-08 15:01:09 140597251774208 [Note] InnoDB: FTS optimize thread exiting.
2019-03-08 15:01:09 140597856737024 [Note] InnoDB: Starting shutdown...
2019-03-08 15:01:09 140597856737024 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
2019-03-08 15:01:11 140597856737024 [Note] InnoDB: Shutdown completed; log sequence number 446281568
2019-03-08 15:01:11 140597856737024 [Note] /usr/sbin/mysqld: Shutdown complete
mysql wordpress ubuntu mariadb vps
mysql wordpress ubuntu mariadb vps
asked Mar 8 at 21:08
Phillip BrantleyPhillip Brantley
133
133
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Would make a comment if I could, but I decided this is too important to just skip entirely.
Server snapshots and database backups are different things. The problem is that a snapshot might capture the database server in the middle of something; if you later re-start the system based on the snapshot the database server might be confused. Most likely it took a few minutes to trip on the lurking inconsistency and crash. Presumably the re-install indirectly started a more-aggressive-than-usual cleanup, which removed the inconsistency. For details, and to confirm my suppositions, you might try https://dba.stackexchange.com/.
Going forward, it might be better to do regular database backups in addition to the system snapshots. It might also work to put WordPress in read-only mode (which isn't simple, but there's a plugin) while the snapshot is being made. (Though it would be a reasonable to ask whether this would work.)
add a comment |
I still have no idea what the root cause of this problem was, but uninstalling and reinstalling Mariadb fixed the issue.
Specifically I did:
# apt-get remove --purge mariadb-server
# apt-get autoremove --purge
# apt-get autoclean
When prompted, I selected to keep the existing databases.
Then I reinstalled Mariadb
# apt-get install mariadb-server
And after this everything worked and I did not need to restore any databases.
The steps Above Did Not Work
After doing the above, everything would work fine until the system was rebooted or until mariadb-server was restarted. Then the original issue would be present again, and the mariadb server would crash after running normally for a minute or so.
I still don't know what the problem was. I know restoring from the snapshot is what caused the issue, but I don't know why or in what way Mariadb was breaking. I even tried removing mariadb-server and all the databases, but when it was reinstalled I'd have the same problem.
I got tired of trying to hunt down the problem so I dumped the wordpress database, removed mariadb-server and all databases, and installed mysql-server. This has fixed the issue.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071021%2fmariadb-loads-but-crashes-after-a-couple-of-minutes-happened-after-server-was%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Would make a comment if I could, but I decided this is too important to just skip entirely.
Server snapshots and database backups are different things. The problem is that a snapshot might capture the database server in the middle of something; if you later re-start the system based on the snapshot the database server might be confused. Most likely it took a few minutes to trip on the lurking inconsistency and crash. Presumably the re-install indirectly started a more-aggressive-than-usual cleanup, which removed the inconsistency. For details, and to confirm my suppositions, you might try https://dba.stackexchange.com/.
Going forward, it might be better to do regular database backups in addition to the system snapshots. It might also work to put WordPress in read-only mode (which isn't simple, but there's a plugin) while the snapshot is being made. (Though it would be a reasonable to ask whether this would work.)
add a comment |
Would make a comment if I could, but I decided this is too important to just skip entirely.
Server snapshots and database backups are different things. The problem is that a snapshot might capture the database server in the middle of something; if you later re-start the system based on the snapshot the database server might be confused. Most likely it took a few minutes to trip on the lurking inconsistency and crash. Presumably the re-install indirectly started a more-aggressive-than-usual cleanup, which removed the inconsistency. For details, and to confirm my suppositions, you might try https://dba.stackexchange.com/.
Going forward, it might be better to do regular database backups in addition to the system snapshots. It might also work to put WordPress in read-only mode (which isn't simple, but there's a plugin) while the snapshot is being made. (Though it would be a reasonable to ask whether this would work.)
add a comment |
Would make a comment if I could, but I decided this is too important to just skip entirely.
Server snapshots and database backups are different things. The problem is that a snapshot might capture the database server in the middle of something; if you later re-start the system based on the snapshot the database server might be confused. Most likely it took a few minutes to trip on the lurking inconsistency and crash. Presumably the re-install indirectly started a more-aggressive-than-usual cleanup, which removed the inconsistency. For details, and to confirm my suppositions, you might try https://dba.stackexchange.com/.
Going forward, it might be better to do regular database backups in addition to the system snapshots. It might also work to put WordPress in read-only mode (which isn't simple, but there's a plugin) while the snapshot is being made. (Though it would be a reasonable to ask whether this would work.)
Would make a comment if I could, but I decided this is too important to just skip entirely.
Server snapshots and database backups are different things. The problem is that a snapshot might capture the database server in the middle of something; if you later re-start the system based on the snapshot the database server might be confused. Most likely it took a few minutes to trip on the lurking inconsistency and crash. Presumably the re-install indirectly started a more-aggressive-than-usual cleanup, which removed the inconsistency. For details, and to confirm my suppositions, you might try https://dba.stackexchange.com/.
Going forward, it might be better to do regular database backups in addition to the system snapshots. It might also work to put WordPress in read-only mode (which isn't simple, but there's a plugin) while the snapshot is being made. (Though it would be a reasonable to ask whether this would work.)
answered Mar 11 at 4:00
Loren RosenLoren Rosen
708
708
add a comment |
add a comment |
I still have no idea what the root cause of this problem was, but uninstalling and reinstalling Mariadb fixed the issue.
Specifically I did:
# apt-get remove --purge mariadb-server
# apt-get autoremove --purge
# apt-get autoclean
When prompted, I selected to keep the existing databases.
Then I reinstalled Mariadb
# apt-get install mariadb-server
And after this everything worked and I did not need to restore any databases.
The steps Above Did Not Work
After doing the above, everything would work fine until the system was rebooted or until mariadb-server was restarted. Then the original issue would be present again, and the mariadb server would crash after running normally for a minute or so.
I still don't know what the problem was. I know restoring from the snapshot is what caused the issue, but I don't know why or in what way Mariadb was breaking. I even tried removing mariadb-server and all the databases, but when it was reinstalled I'd have the same problem.
I got tired of trying to hunt down the problem so I dumped the wordpress database, removed mariadb-server and all databases, and installed mysql-server. This has fixed the issue.
add a comment |
I still have no idea what the root cause of this problem was, but uninstalling and reinstalling Mariadb fixed the issue.
Specifically I did:
# apt-get remove --purge mariadb-server
# apt-get autoremove --purge
# apt-get autoclean
When prompted, I selected to keep the existing databases.
Then I reinstalled Mariadb
# apt-get install mariadb-server
And after this everything worked and I did not need to restore any databases.
The steps Above Did Not Work
After doing the above, everything would work fine until the system was rebooted or until mariadb-server was restarted. Then the original issue would be present again, and the mariadb server would crash after running normally for a minute or so.
I still don't know what the problem was. I know restoring from the snapshot is what caused the issue, but I don't know why or in what way Mariadb was breaking. I even tried removing mariadb-server and all the databases, but when it was reinstalled I'd have the same problem.
I got tired of trying to hunt down the problem so I dumped the wordpress database, removed mariadb-server and all databases, and installed mysql-server. This has fixed the issue.
add a comment |
I still have no idea what the root cause of this problem was, but uninstalling and reinstalling Mariadb fixed the issue.
Specifically I did:
# apt-get remove --purge mariadb-server
# apt-get autoremove --purge
# apt-get autoclean
When prompted, I selected to keep the existing databases.
Then I reinstalled Mariadb
# apt-get install mariadb-server
And after this everything worked and I did not need to restore any databases.
The steps Above Did Not Work
After doing the above, everything would work fine until the system was rebooted or until mariadb-server was restarted. Then the original issue would be present again, and the mariadb server would crash after running normally for a minute or so.
I still don't know what the problem was. I know restoring from the snapshot is what caused the issue, but I don't know why or in what way Mariadb was breaking. I even tried removing mariadb-server and all the databases, but when it was reinstalled I'd have the same problem.
I got tired of trying to hunt down the problem so I dumped the wordpress database, removed mariadb-server and all databases, and installed mysql-server. This has fixed the issue.
I still have no idea what the root cause of this problem was, but uninstalling and reinstalling Mariadb fixed the issue.
Specifically I did:
# apt-get remove --purge mariadb-server
# apt-get autoremove --purge
# apt-get autoclean
When prompted, I selected to keep the existing databases.
Then I reinstalled Mariadb
# apt-get install mariadb-server
And after this everything worked and I did not need to restore any databases.
The steps Above Did Not Work
After doing the above, everything would work fine until the system was rebooted or until mariadb-server was restarted. Then the original issue would be present again, and the mariadb server would crash after running normally for a minute or so.
I still don't know what the problem was. I know restoring from the snapshot is what caused the issue, but I don't know why or in what way Mariadb was breaking. I even tried removing mariadb-server and all the databases, but when it was reinstalled I'd have the same problem.
I got tired of trying to hunt down the problem so I dumped the wordpress database, removed mariadb-server and all databases, and installed mysql-server. This has fixed the issue.
edited Mar 16 at 5:35
answered Mar 9 at 5:11
Phillip BrantleyPhillip Brantley
133
133
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071021%2fmariadb-loads-but-crashes-after-a-couple-of-minutes-happened-after-server-was%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown