User Tools

Site Tools


wiki:mysql_mariadb_troubleshooting

mysql/mariadb troubleshooting

mount namespacing

If you get this error

Jul 14 13:00:20 mariadb systemd[1]: Starting MariaDB 10.3.15 database server...
Jul 14 13:00:21 mariadb systemd[1296]: mariadb.service: Failed to set up mount namespacing: Permission denied
Jul 14 13:00:21 mariadb systemd[1296]: mariadb.service: Failed at step NAMESPACE spawning /usr/sbin/mysqld: Permission denied
Jul 14 13:00:21 mariadb systemd[1]: mariadb.service: Main process exited, code=exited, status=226/NAMESPACE
Jul 14 13:00:21 mariadb systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jul 14 13:00:21 mariadb systemd[1]: Failed to start MariaDB 10.3.15 database server.

The workaround is to override the mariadb.service file

cat <<EOF >/etc/systemd/system/mariadb.service.d/override.conf
[Service]
ProtectSystem=off
PrivateDevices=false
ProtectHome=false
EOF

If running a container in Proxmox you can also enable Nesting from web gui container > Options > Edit > Features > Nesting

mariadb won't start

If starting with systemctl start mariadb times out, try checking if the instance is part of Galera cluster. It might be that other instances need to be started as well.

[ERROR] Error reading packet from server: Client requested master to start replication from impossible position ( server_errno=1236)

replication from impossible position; the first event 'mysql-bin.004225' at 14311389, the last event read from 'mysql-bin.004225' at 4, the last byte read from 'mysql-bin.004225' at 4.'

Happened when master server crashed. The error above showed on slave. Solution is to start replication from the next binlog file after the one in error above.

First stop slave:

MariaDB [(none)]> STOP SLAVE;

Change binlog and start slave:

MariaDB [(none)]> CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.004226', MASTER_LOG_POS=4;
MariaDB [(none)]> START SLAVE;
MariaDB [(none)]> show slave status \G

Tested on

See also

References

wiki/mysql_mariadb_troubleshooting.txt · Last modified: by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki