Debian 9: After upgrade from 8, MySQL (MariaDB) does no longer work

11,087

Solution 1

For some reason you don't have the file /etc/mysql/debian-start, which is the error given:

16:55:25 doraemoe systemd[6859]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory

I have checked my installation of mariadb and that file is part of the mariadb-server-10.1 package. Check whether there is /etc/mysql/debian-start.dpkg-dist or similar, if so rename that to /etc/mysql/debian-start.

Otherwise, check what exact package name you have installed:

dpkg -S /usr/bin/mysqld_safe

mariadb-server-10.1: /usr/bin/mysqld_safe

Download the package .deb (e.g. via this page), unpack it:

dpkg-deb --extract mariadb-server-10.1_10.1.26-0+deb9u1_amd64.deb /tmp/mariadb-server

(substitute the name of the file you downloaded) and then copy the file:

cp /tmp/mariadb-server/etc/mysql/debian-start /etc/mysql/

You should then be able to start it; unless there are more files missing. It's strange, that this file should be missing so something went wrong at some stage.

Solution 2

Try it with systemctl start mysqld

[root@server ~]# systemctl status mysqld
● mariadb.service - MariaDB database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2017-12-02 13:39:38 CET; 2 months 1 days ago
 Main PID: 31087 (mysqld)
   Status: "Taking your SQL requests now..."
    Tasks: 27 (limit: 4915)
   CGroup: /system.slice/mariadb.service
           └─31087 /usr/sbin/mysqld

Dez 02 13:39:37 h2730855 systemd[1]: Starting MariaDB database server...
Dez 02 13:39:37 h2730855 mysqld[31087]: 2017-12-02 13:39:37 140401666978368 [Note] /usr/sbin/mysqld (mysqld 10.1.26-MariaDB-0+deb9u1) starting as process 31087 
Dez 02 13:39:38 h2730855 systemd[1]: Started MariaDB database server.
Share:
11,087

Related videos on Youtube

Doraemoe
Author by

Doraemoe

Updated on September 18, 2022

Comments

  • Doraemoe
    Doraemoe over 1 year

    I just upgraded from Debian 8 to 9.

    Apparently, it breaks everything database related. I now can't start MySQL, the error is:

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
    

    Service status:

    systemctl status mariadb.service
    

    Shows errors:

    ● mariadb.service - MariaDB database server
       Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Fri 2018-02-02 16:55:27 AEST; 35s ago
      Process: 6859 ExecStartPost=/etc/mysql/debian-start (code=exited, status=203/EXEC)
      Process: 6832 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
      Process: 6821 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: 6815 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
      Process: 6814 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
     Main PID: 6832 (code=exited, status=0/SUCCESS)
       Status: "MariaDB server is down"
    
    2 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495303359232 [Note] /usr/sbin/mysqld: Normal shutdown
    2 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495303359232 [Note] Event Scheduler: Purging the queue. 0 events
    2 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140494621349632 [Note] InnoDB: FTS optimize thread exiting.
    2 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495303359232 [Note] InnoDB: Starting shutdown...
    2 02 16:55:26 doraemoe mysqld[6832]: 2018-02-02 16:55:26 140495303359232 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
    2 02 16:55:27 doraemoe mysqld[6832]: 2018-02-02 16:55:27 140495303359232 [Note] InnoDB: Shutdown completed; log sequence number 1616889
    2 02 16:55:27 doraemoe mysqld[6832]: 2018-02-02 16:55:27 140495303359232 [Note] /usr/sbin/mysqld: Shutdown complete
    2 02 16:55:27 doraemoe systemd[1]: Failed to start MariaDB database server.
    2 02 16:55:27 doraemoe systemd[1]: mariadb.service: Unit entered failed state.
    2 02 16:55:27 doraemoe systemd[1]: mariadb.service: Failed with result 'exit-code'.
    

    Another way to get some information:

    journalctl -xe` that maybe useful: `2 02 16:42:39 doraemoe systemd[5505]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory
    

    How do I fix it?

    Edit:Here is the complete output of journalctl -u mariadb.service

    Logs begin at Fri 2018-02-02 16:36:33 AEST, end at Fri 2018-02-02 19:05:01 AEST. 
    2月 02 16:36:35 doraemoe systemd[1]: Starting MariaDB database server...
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] /usr/sbin/mysqld (mysqld 10.1.26-MariaDB-0+deb9u1) starting as process 3534 ...
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: The InnoDB memory heap is disabled
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: Compressed tables use zlib 1.2.8
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: Using Linux native AIO
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: Using SSE crc32 instructions
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: Completed initialization of buffer pool
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: Highest supported file format is Barracuda.
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: 128 rollback segment(s) are active.
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB: Waiting for purge to start
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.1 started; log sequence number 1616859
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] Plugin 'FEEDBACK' is disabled.
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] Server socket created on IP: '::'.
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139855396824832 [Note] InnoDB: Dumping buffer pool(s) not yet started
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856107147840 [Note] /usr/sbin/mysqld: ready for connections.
    2月 02 16:36:36 doraemoe mysqld[3534]: Version: '10.1.26-MariaDB-0+deb9u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian 9.1
    2月 02 16:36:36 doraemoe systemd[3810]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory
    2月 02 16:36:36 doraemoe systemd[1]: mariadb.service: Control process exited, code=exited status=203
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856106375936 [Note] /usr/sbin/mysqld: Normal shutdown
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856106375936 [Note] Event Scheduler: Purging the queue. 0 events
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139855422002944 [Note] InnoDB: FTS optimize thread exiting.
    2月 02 16:36:36 doraemoe mysqld[3534]: 2018-02-02 16:36:36 139856106375936 [Note] InnoDB: Starting shutdown...
    2月 02 16:36:37 doraemoe mysqld[3534]: 2018-02-02 16:36:37 139856106375936 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
    2月 02 16:36:39 doraemoe mysqld[3534]: 2018-02-02 16:36:39 139856106375936 [Note] InnoDB: Shutdown completed; log sequence number 1616869
    2月 02 16:36:39 doraemoe mysqld[3534]: 2018-02-02 16:36:39 139856106375936 [Note] /usr/sbin/mysqld: Shutdown complete
    2月 02 16:36:39 doraemoe systemd[1]: Failed to start MariaDB database server.
    2月 02 16:36:39 doraemoe systemd[1]: mariadb.service: Unit entered failed state.
    2月 02 16:36:39 doraemoe systemd[1]: mariadb.service: Failed with result 'exit-code'.
    2月 02 16:42:39 doraemoe systemd[1]: Starting MariaDB database server...
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] /usr/sbin/mysqld (mysqld 10.1.26-MariaDB-0+deb9u1) starting as process 5478 ...
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: The InnoDB memory heap is disabled
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: Compressed tables use zlib 1.2.8
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: Using Linux native AIO
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: Using SSE crc32 instructions
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: Completed initialization of buffer pool
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: Highest supported file format is Barracuda.
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: 128 rollback segment(s) are active.
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB: Waiting for purge to start
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.1 started; log sequence number 1616869
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] Plugin 'FEEDBACK' is disabled.
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140596496787200 [Note] InnoDB: Dumping buffer pool(s) not yet started
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] Server socket created on IP: '::'.
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597204075072 [Note] /usr/sbin/mysqld: ready for connections.
    2月 02 16:42:39 doraemoe mysqld[5478]: Version: '10.1.26-MariaDB-0+deb9u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian 9.1
    2月 02 16:42:39 doraemoe systemd[5505]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory
    2月 02 16:42:39 doraemoe systemd[1]: mariadb.service: Control process exited, code=exited status=203
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597203303168 [Note] /usr/sbin/mysqld: Normal shutdown
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597203303168 [Note] Event Scheduler: Purging the queue. 0 events
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140596521965312 [Note] InnoDB: FTS optimize thread exiting.
    2月 02 16:42:39 doraemoe mysqld[5478]: 2018-02-02 16:42:39 140597203303168 [Note] InnoDB: Starting shutdown...
    2月 02 16:42:40 doraemoe mysqld[5478]: 2018-02-02 16:42:40 140597203303168 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
    2月 02 16:42:42 doraemoe mysqld[5478]: 2018-02-02 16:42:42 140597203303168 [Note] InnoDB: Shutdown completed; log sequence number 1616879
    2月 02 16:42:42 doraemoe mysqld[5478]: 2018-02-02 16:42:42 140597203303168 [Note] /usr/sbin/mysqld: Shutdown complete
    2月 02 16:42:42 doraemoe systemd[1]: Failed to start MariaDB database server.
    2月 02 16:42:42 doraemoe systemd[1]: mariadb.service: Unit entered failed state.
    2月 02 16:42:42 doraemoe systemd[1]: mariadb.service: Failed with result 'exit-code'.
    2月 02 16:55:24 doraemoe systemd[1]: Starting MariaDB database server...
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] /usr/sbin/mysqld (mysqld 10.1.26-MariaDB-0+deb9u1) starting as process 6832 ...
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] InnoDB: The InnoDB memory heap is disabled
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] InnoDB: Compressed tables use zlib 1.2.8
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] InnoDB: Using Linux native AIO
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] InnoDB: Using SSE crc32 instructions
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] InnoDB: Completed initialization of buffer pool
    2月 02 16:55:24 doraemoe mysqld[6832]: 2018-02-02 16:55:24 140495304131136 [Note] InnoDB: Highest supported file format is Barracuda.
    2月 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495304131136 [Note] InnoDB: 128 rollback segment(s) are active.
    2月 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495304131136 [Note] InnoDB: Waiting for purge to start
    2月 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495304131136 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.1 started; log sequence number 1616879
    2月 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495304131136 [Note] Plugin 'FEEDBACK' is disabled.
    2月 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140494596171520 [Note] InnoDB: Dumping buffer pool(s) not yet started
    2月 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495304131136 [Note] Server socket created on IP: '::'.
    2月 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495304131136 [Note] /usr/sbin/mysqld: ready for connections.
    2月 02 16:55:25 doraemoe mysqld[6832]: Version: '10.1.26-MariaDB-0+deb9u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian 9.1
    2月 02 16:55:25 doraemoe systemd[6859]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory
    2月 02 16:55:25 doraemoe systemd[1]: mariadb.service: Control process exited, code=exited status=203
    2月 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495303359232 [Note] /usr/sbin/mysqld: Normal shutdown
    2月 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495303359232 [Note] Event Scheduler: Purging the queue. 0 events
    2月 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140494621349632 [Note] InnoDB: FTS optimize thread exiting.
    2月 02 16:55:25 doraemoe mysqld[6832]: 2018-02-02 16:55:25 140495303359232 [Note] InnoDB: Starting shutdown...
    2月 02 16:55:26 doraemoe mysqld[6832]: 2018-02-02 16:55:26 140495303359232 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
    2月 02 16:55:27 doraemoe mysqld[6832]: 2018-02-02 16:55:27 140495303359232 [Note] InnoDB: Shutdown completed; log sequence number 1616889
    2月 02 16:55:27 doraemoe mysqld[6832]: 2018-02-02 16:55:27 140495303359232 [Note] /usr/sbin/mysqld: Shutdown complete
    2月 02 16:55:27 doraemoe systemd[1]: Failed to start MariaDB database server.
    2月 02 16:55:27 doraemoe systemd[1]: mariadb.service: Unit entered failed state.
    2月 02 16:55:27 doraemoe systemd[1]: mariadb.service: Failed with result 'exit-code'.
    

    Run /etc/init.d/mysql start results:

    [....] Starting mysql (via systemctl): mysql.serviceJob for mariadb.service failed because the control process exited with error code.
    See "systemctl status mariadb.service" and "journalctl -xe" for details.
     failed!
    

    I can't find a file named mysql.err and ps -aux|grep -i maria yields no result.

    • JdeBP
      JdeBP over 6 years
      Just like the questioner at unix.stackexchange.com/questions/410633 you are a victim of the verbosity of MySQL/MariaDB/Percona logs. And just as there, we (your readership and potential answerers) are the victims of not being shown the log. To diagnose the problem, one first has to know the reason that the server decided to shut down. That has scrolled off the top of the window that systemctl status shows.
    • Jan
      Jan over 6 years
      Check with ps -aux|grep -i maria, maybe there's another instance running that you somehow started manually?
    • Rui F Ribeiro
      Rui F Ribeiro over 6 years
      If not having nothing running in ps, start one manually to see what errors it spews out. Upgrading from 8 to 9 is a major change in MySQL and PHP, have you done tests?
    • LSerni
      LSerni over 6 years
      Try starting again the service, then check the logs. Do not use systemctl status, do not use journalctl, just look at /var/log/syslog and the mysql error log (/var/lib/mysql/mysql.err or /var/log/mysql... if I recall correctly). MySQL reported doing a successful controlled shutdown, so everything is still fixable - you just probably have some obsoleted settings in my.cnf.
    • JdeBP
      JdeBP over 6 years
      Actually, do use journalctl. Use it as well, and use it to show us the complete log of an attempt to start up this service that auto-shuts-down. Remember that you can filter by service.
    • Rui F Ribeiro
      Rui F Ribeiro over 6 years
      Even with with syslog and not systemd, usually at this stage running the actual daemon by hand spews more informative errors. If the user manages to do that. However I am more familiar with the classic MySQL and not MariaDB, I am afraid.
    • Doraemoe
      Doraemoe over 6 years
      Thank you for all your suggestions, I have edited my question to provide more information.
  • Rui F Ribeiro
    Rui F Ribeiro over 6 years
    The question is complaining it is not able to do that. This does not provide an answer to the OP.
  • Rui F Ribeiro
    Rui F Ribeiro over 6 years
    I would prefer not using the dpkg-dist, it could be remnants from an old non-MariaDB MySQL. +1
  • wurtel
    wurtel over 6 years
    @RuiFRibeiro the script is pretty generic, most of the magic is contained in /usr/share/mysql/debian-start.inc.sh. I see nothing mariadb-specific in it.
  • wurtel
    wurtel over 6 years
    That doesn't sound right :( Simply upgrading to mariadb shouldn't have done anything with the existing databases. You didn't purge the mysql packages first, I hope? For both mysql and mariadb the database files should be in/under the /var/lib/mysql/ directory.
  • Doraemoe
    Doraemoe over 6 years
    I did :( and I even searched and find someone said purge won't delete my database. Oh well, it's my stupidity then. That hurts :(
  • wurtel
    wurtel over 6 years
    I hate to say it, but make backups. I have a cronjob running daily that finds all databases and then dumps each to /var/backups/mysql/. On important systems that then gets backupped remotely.
  • Doraemoe
    Doraemoe over 6 years
    I have remote backup setup to run weekly, but apparently it was broken and haven't run for some month. And all previous backup has everything except database, sigh.
  • Srivats Shankar
    Srivats Shankar over 5 years
    Just the solution I was looking for. Thank you!
  • Samuel
    Samuel about 3 years
    This did the trick! Thanks so much. Although I suggest people just download the package with apt download instead.