MariaDB on Linux for businesses: backups, performance, InnoDB settings and troubleshooting of slow queries. We help you in Stockholm and across Sweden.
The database behind most websites
MariaDB and MySQL are currently the most common databases on Linux servers. WordPress, online shops and also many business systems store all their content there. Therefore, you notice immediately when the database becomes slow or stops working. Moreover, MariaDB on Linux is the default in many distributions, for example Debian, AlmaLinux and Amazon Linux. We run the database on our own servers and for clients across Sweden.
The long-term support versions of MariaDB receive updates for several years, and therefore we always choose one of them for production. Right now, many people use 10.11, 11.4 or 11.8, while 12.3 from May 2026 is the latest long-term version. We also keep track of when your version stops receiving fixes. When it is time, we plan an upgrade, and we carry it out with the same care as when we upgraded MariaDB on our own servers.

Backups that actually work
A database without a working backup is a risk that many underestimate. Therefore, we take backups every night with mariadb-dump and the flag --single-transaction. It gives a consistent copy without locking the tables, and as a result the visitors notice nothing. After that, we compress the file and store it with strict permissions. In addition, we send a copy to another location, for example a storage service in the cloud.
The most important thing, however, is to test the restore, since a copy is otherwise just an assumption. We regularly load a backup into a test database and check that everything is there. Only then do we know that the copy really works. For larger databases, we instead use Mariabackup, which copies the files directly and is faster to restore. We choose the method according to the size of the database and how quickly it must be back.

Performance: the buffer pool and slow queries
The most important setting for performance is innodb_buffer_pool_size, because it decides how much data fits in the memory. If it is too small, the database has to read from disk all the time, and then everything becomes slow. On a dedicated database server, it can be up to 70 per cent of the memory. If the database shares a server with Apache and PHP, however, we choose a lower value.
After that, we look at slow queries, for example those that run thousands of times per hour. We switch on the slow query log and analyse it after a few days. Often we find queries that lack an index or that fetch much more data than they need. A single index can sometimes make a query a hundred times faster. We test every change and measure the effect, so that you see the result.

Troubleshooting common errors
Many cases start with the website showing an error about the database connection. The cause may be that MariaDB has stopped, that the disk is full or that the number of connections has run out. First, we read the error log and check the status with systemctl. If the service has crashed, we look for the cause before we restart it. Otherwise, there is a high risk that the same thing happens again.
Another common error is that root cannot sign in, with the message Access denied. In newer versions, root often signs in via the operating system account instead of with a password. Then sudo mariadb works, but signing in with a password does not. In other words, it is not a bug but a security feature. We explain it and set the right permissions for your programs.

Security for the database
The database, on the other hand, should never be directly visible to the internet. Therefore, we make sure that it only listens on the local address or on an internal network. In addition, each program gets its own database account with only the permissions it needs. For example, a WordPress account does not need the right to create new users in the database. This limits the damage if a website is hacked.
We also use custom table prefixes in WordPress and strong passwords stored in protected files. We also remove old test databases and anonymous accounts. Finally, we make sure that security updates are installed regularly. More about security in the article on hardening Linux.
Contact Linux Service about MariaDB on Linux
Linux Service is part of Datorkirurgen AB and has worked with databases for more than 30 years. We optimise, back up and troubleshoot MariaDB and MySQL for businesses across Sweden. Information about versions and support periods is available from the MariaDB Foundation.
Therefore, contact us when the database has become slow or when you are unsure about your backups. We carry out a review and propose actions in order of priority. We work remotely, and you always receive a short report. Moreover, we can take over the ongoing operation.
Frequently asked questions about MariaDB on Linux
Questions about MariaDB on Linux
- What is the difference between MariaDB and MySQL?
- Which version should we use in production?
- How long does a long-term version receive updates?
- How do you see which version is running?
- Does WordPress work with MariaDB?
- Can MariaDB and PHP run on the same server?
- Do we need a separate database server?
- Can you move a database to a new server?
- How large can a database become?
- Is MariaDB suitable for business systems?
MariaDB: backups and performance
- How do you take a backup without locking the tables?
- What does –single-transaction do?
- How do you test that a backup works?
- When is Mariabackup better than mariadb-dump?
- What does innodb_buffer_pool_size mean?
- How large should the buffer pool be?
- How do you switch on the slow query log?
- Why does an index make such a big difference?
- How many connections should the database allow?
- How do you measure the effect of a change?
More about troubleshooting and security
- Why does the website get a database connection error?
- Why does root get Access denied?
- What do you do when MariaDB has crashed?
- Why should the database not be visible to the internet?
- How do you create an account with restricted permissions?
- Why should WordPress have its own table prefix?
- Can you take over the operation of our database?
- Do you work remotely?
- What does your help cost?
- How do I contact you about MariaDB?
