[{"data":1,"prerenderedAt":218},["ShallowReactive",2],{"seo-verification":3,"blog-mariadb-on-a-vps-free-fast-controlled-sql-ma-en":6,"promo-bar-likely":217},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-mariadb-on-a-vps-free-fast-controlled-sql-ma-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"noindex":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":28,"featuredImage":30,"bgImage":31,"posterImage":32,"relatedSolution":33,"intro":36,"sections":37,"ctaTitle":146,"ctaBody":147,"ctaButton":148,"ctaUrl":149,"relatedPosts":150},146,"mariadb-on-a-vps-free-fast-controlled-sql",{"fr":12,"en":10,"ar":13,"es":14},"heberger-mariadb-vps","mariadb-على-vps-sql-حر-وسريع-وتحت-السيطرة","alojar-mariadb-en-un-vps","MariaDB on a VPS: free, fast, controlled SQL","Deploy MariaDB on a ServOrbit VPS: 1-click install, automated backups, InnoDB tuning and secure remote access.",10,1,false,"2026-01-30T00:00:00+00:00","2026-10-07T23:07:24+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},6,"Databases","bases-de-donnees","bg-teal-500\u002F10 text-teal-400","database",[29],{"id":23,"name":24,"slug":25,"color":26,"icon":27},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fheberger-mariadb-vps-poster.svg",{"categorySlug":34,"appSlug":35},"db","mariadb-stack","MariaDB remains a robust foundation for WordPress, Dolibarr, PrestaShop and many PHP applications. On a ServOrbit VPS, you keep control over accounts, volumes, backups and network security — without relying on an opaque shared hosting offer. This guide covers the full installation, InnoDB performance tuning, automated backups and secure remote access.",[38,42,52,55,86,89,92,95,98,140,143],{"type":39,"title":40,"body":41},"h2","Why host MariaDB on a VPS?","MariaDB is a community fork of MySQL, 100% open source, renowned for its performance, reliability and full compatibility with existing MySQL applications. Hosted on a VPS, it frees you from the restrictions of shared hosting: no imposed connection limits, no arbitrary quotas on database size, and the ability to finely tune InnoDB engine parameters according to your real load. You keep control of your backups, your users and network security, without depending on a third-party provider for every maintenance operation.\n\nTwo LTS versions are available today: **MariaDB 11.4 LTS** (released May 2024, support guaranteed until 2028+) and **MariaDB 10.11 LTS** (support until February 2028). Both are stable for production; 11.4 notably brings the definitive shift from the `mysql` client to `mariadb`, better thread parallelism and InnoDB improvements.",{"type":43,"title":44,"items":45},"ul","What you can do with MariaDB on your VPS",[46,47,48,49,50,51],"Host several databases for different projects or clients on a single instance, with isolation per MariaDB user","Connect your Laravel, Symfony, WordPress or any other framework application through the standard port 3306, locally or from a remote server secured by a firewall","Run automated backups with `mariadb-dump` and store them compressed with configurable retention","Set up master-slave replication to ensure high availability or offload read-heavy workloads","Optimise performance by adjusting `innodb_buffer_pool_size`, `innodb_log_file_size` and `max_connections` directly in `\u002Fetc\u002Fmysql\u002Fconf.d\u002F`","Manage your databases through graphical interfaces such as phpMyAdmin, Adminer or DBeaver connected remotely via a secure SSH tunnel",{"type":39,"title":53,"body":54},"Prerequisites","Before you start, make sure you have the following:\n\n- **A ServOrbit VPS**: 2 GB of RAM minimum (light use or testing), **4 GB recommended in production**. MariaDB itself consumes little, but the InnoDB buffer pool (`innodb_buffer_pool_size`) should represent 60 to 70% of available RAM to be effective — on 2 GB, less than 1.2 GB remains after the operating system.\n- **SSH root access** or sudo to your VPS.\n- **A recent MariaDB version**: MariaDB 11.4 LTS (May 2024, support until 2028+) or MariaDB 10.11 LTS (support until February 2028). Avoid 10.6 and below in production: they are approaching end of support.\n- **An active firewall** (UFW or equivalent): port 3306 must never be exposed directly to the Internet.",{"type":56,"title":57,"steps":58},"steps","Install MariaDB on your ServOrbit VPS",[59,62,65,68,71,74,77,80,83],{"title":60,"body":61},"Order a ServOrbit Cloud VPS","Head to \u002Fvps-cloud and choose the plan suited to your load. For a production MariaDB instance, a VPS with 2 vCPU and 4 GB of RAM is a good starting point. Complete the order and note the SSH credentials (IP, user, password or key) sent by email.",{"title":63,"body":64},"Connect to your VPS over SSH","Open a terminal and connect to your VPS:\n\n```bash\nssh root@\u003Cyour-ip>\n```\n\nIf you use an SSH key rather than a password:\n\n```bash\nssh -i ~\u002F.ssh\u002Fmy_key root@\u003Cyour-ip>\n```\n\nOnce connected, check system version and available resources: `free -m` for memory, `nproc` for CPU cores.",{"title":66,"body":67},"Open the Marketplace in your client area","Log in to your ServOrbit client area, then navigate to the 'My VPS' section. Select your newly ordered VPS and click the 'Marketplace' tab to access the catalogue of applications available as 1-click installs.",{"title":69,"body":70},"Select MariaDB and launch the installation","In the Marketplace, search for 'MariaDB' and click the application tile. Check the offered version (MariaDB 10.11 LTS or 11.4 LTS recommended), then click 'Install'. The system automatically provisions MariaDB on your VPS, configures the systemd service and generates a random root password provided to you at the end of the installation.",{"title":72,"body":73},"Secure the installation with mysql_secure_installation","From your SSH session, run:\n\n```bash\nmysql_secure_installation\n```\n\nThis interactive script guides you through setting or strengthening the root password, removing anonymous users, disabling remote root login and dropping the test database. These steps are essential before any production use.",{"title":75,"body":76},"Connect to the MariaDB shell","Since MariaDB 11, the client is called `mariadb` (no longer `mysql`). Both work under 10.11, but `mariadb` is the canonical command:\n\n```bash\nmariadb -u root -p\n```\n\nEnter the root password set in the previous step. You are now in the interactive SQL shell (`MariaDB [(none)]>`).",{"title":78,"body":79},"Create a database with utf8mb4","Always create databases with `utf8mb4` encoding and `utf8mb4_unicode_ci` collation for correct handling of all characters (including emojis):\n\n```sql\nCREATE DATABASE my_app CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\nSHOW DATABASES;\n```\n\n`SHOW DATABASES;` confirms your database appears in the list.",{"title":81,"body":82},"Create a dedicated application user","Never use `root` from your application. Create a user limited to your database:\n\n```sql\nCREATE USER 'appuser'@'localhost' IDENTIFIED BY 'strong_password';\nGRANT ALL PRIVILEGES ON my_app.* TO 'appuser'@'localhost';\nFLUSH PRIVILEGES;\n```\n\nYour application can now connect via host `127.0.0.1`, port `3306`, with these credentials.",{"title":84,"body":85},"Verify MariaDB starts automatically","Ensure the service restarts after a VPS reboot:\n\n```bash\nsystemctl enable mariadb\nsystemctl status mariadb\n```\n\nThe output should show `active (running)`. If the service is not enabled at startup, `systemctl enable mariadb` configures it.",{"type":39,"title":87,"body":88},"Automated backups with mariadb-dump","A database without automated backups is a ticking time bomb. The following script creates a compressed nightly backup with 7-day retention.\n\n**Create the backup script** at `\u002Fusr\u002Flocal\u002Fbin\u002Fbackup-mariadb.sh`:\n\n```bash\n#!\u002Fbin\u002Fbash\nBACKUP_DIR=\"\u002Fvar\u002Fbackups\u002Fmariadb\"\nDATE=$(date +%Y%m%d_%H%M%S)\nDB_USER=\"root\"\nDB_PASS=\"your_root_password\"\nRETENTION=7\n\nmkdir -p \"$BACKUP_DIR\"\n\n# List all databases (excluding system ones)\nDATABASES=$(mariadb -u\"$DB_USER\" -p\"$DB_PASS\" -e \"SHOW DATABASES;\" 2>\u002Fdev\u002Fnull | \\\n  grep -vE \"^(Database|information_schema|performance_schema|mysql|sys)$\")\n\nfor DB in $DATABASES; do\n  mariadb-dump \\\n    -u\"$DB_USER\" -p\"$DB_PASS\" \\\n    --single-transaction \\\n    --quick \\\n    --routines \\\n    --triggers \\\n    \"$DB\" | gzip > \"$BACKUP_DIR\u002F${DB}_${DATE}.sql.gz\"\ndone\n\n# Remove backups older than RETENTION days\nfind \"$BACKUP_DIR\" -name \"*.sql.gz\" -mtime +$RETENTION -delete\n```\n\nMake the script executable and add a cron job to run it every night at 02:00:\n\n```bash\nchmod +x \u002Fusr\u002Flocal\u002Fbin\u002Fbackup-mariadb.sh\ncrontab -e\n```\n\nAdd the following line:\n\n```bash\n0 2 * * * \u002Fusr\u002Flocal\u002Fbin\u002Fbackup-mariadb.sh >> \u002Fvar\u002Flog\u002Fbackup-mariadb.log 2>&1\n```\n\n**Why `--single-transaction` and `--quick`**: `--single-transaction` takes a consistent snapshot without locking InnoDB tables (essential in production to avoid write blocks); `--quick` streams rows one at a time without loading them into memory, preventing RAM overflow on large tables.\n\nTo restore a database from a backup:\n\n```bash\nzcat \u002Fvar\u002Fbackups\u002Fmariadb\u002Fmy_app_20261007_020000.sql.gz | mariadb -u root -p my_app\n```",{"type":39,"title":90,"body":91},"Optimisation: configuring InnoDB","MariaDB's default configuration is very conservative (only a few tens of MB for `innodb_buffer_pool_size`). On a production VPS, tune InnoDB parameters to make full use of available memory.\n\n**Create the file** `\u002Fetc\u002Fmysql\u002Fconf.d\u002Fperformance.cnf`:\n\n```bash\n[mysqld]\n# InnoDB buffer pool: 60-70% of total RAM\n# On 4 GB RAM → 2.5 GB\ninnodb_buffer_pool_size = 2560M\n\n# Log file size (recommended: 25% of pool)\ninnodb_log_file_size = 640M\n\n# Number of log files (default 2, sufficient)\ninnodb_log_files_in_group = 2\n\n# Query cache disabled on MariaDB 10.3+ (measured degradation)\nquery_cache_size = 0\nquery_cache_type = 0\n\n# Simultaneous connections (adjust to real load)\nmax_connections = 150\n\n# Slow query log (identify queries to optimise)\nslow_query_log = 1\nlong_query_time = 1\nslow_query_log_file = \u002Fvar\u002Flog\u002Fmysql\u002Fmariadb-slow.log\n```\n\nAdjust `innodb_buffer_pool_size` according to your VPS RAM: on **2 GB**, use **1.2 GB** (1228M); on **8 GB**, use **5.5 GB** (5632M).\n\nThen restart MariaDB to apply the configuration:\n\n```bash\nsystemctl restart mariadb\n```\n\nVerify the parameters were applied:\n\n```sql\nSHOW VARIABLES LIKE 'innodb_buffer_pool_size';\nSHOW VARIABLES LIKE 'query_cache_size';\n```",{"type":39,"title":93,"body":94},"Secure remote access","By default, MariaDB only listens on `127.0.0.1` — this is the secure default. For access from an application on another server, two approaches exist.\n\n**Option 1 — SSH tunnel (recommended, without opening port 3306)**\n\nFrom your local machine or application server:\n\n```bash\nssh -L 3306:127.0.0.1:3306 -N root@\u003Cmariadb-vps-ip>\n```\n\nYour application then connects to `127.0.0.1:3306` locally — the SSH tunnel encrypts the traffic. Add `-f` to put the tunnel in the background.\n\n**Option 2 — Inter-VPS connection with IP allowlisting**\n\nIf your application runs on another ServOrbit VPS (e.g., a separate application VPS from the database VPS), open the port only for that server's private IP:\n\n```bash\n# In \u002Fetc\u002Fmysql\u002Fconf.d\u002Fnetwork.cnf\n[mysqld]\nbind-address = 0.0.0.0\n```\n\n```bash\n# Allow only the application server IP\nufw allow from \u003Capp-ip> to any port 3306\n```\n\nCreate the MariaDB user limited to the application server's IP:\n\n```sql\nCREATE USER 'app'@'\u003Capp-ip>' IDENTIFIED BY 'strong_password';\nGRANT ALL PRIVILEGES ON my_app.* TO 'app'@'\u003Capp-ip>';\nFLUSH PRIVILEGES;\n```\n\nNever create a `'user'@'%'` account (wildcard host): this allows connections from any IP — if port 3306 were accidentally opened, the account would be directly accessible from the Internet.",{"type":39,"title":96,"body":97},"Troubleshooting","Here are the four most common errors when running MariaDB on a VPS, and how to resolve them.\n\n**1. `Can't connect to local MariaDB server through socket`**\n\nThe MariaDB service is not running or the socket is missing.\n\n```bash\nsystemctl status mariadb\nsystemctl start mariadb\n```\n\nIf the service refuses to start, read the logs:\n\n```bash\njournalctl -xe -u mariadb --no-pager | tail -40\n```\n\nCommon cause: `innodb_buffer_pool_size` is too large for the available RAM — MariaDB stops immediately without an obvious message. Reduce the value in `\u002Fetc\u002Fmysql\u002Fconf.d\u002Fperformance.cnf`.\n\n**2. `Too many connections`**\n\nThe number of simultaneous connections has reached the limit. Increase `max_connections` in `\u002Fetc\u002Fmysql\u002Fconf.d\u002Fperformance.cnf` then reload:\n\n```bash\nsystemctl reload mariadb\n```\n\nInspect active connections before increasing: `SHOW PROCESSLIST;` in the MariaDB shell. Hundreds of idle connections usually indicate a misconfigured connection pool on the application side.\n\n**3. `Table '\u003Cname>' is marked as crashed`**\n\nA MyISAM table is corrupt (system crash, power outage). Repair it:\n\n```bash\nmysqlcheck -u root -p --repair my_app table_name\n```\n\nIf you use InnoDB (the general case), this error is rare; InnoDB corruption is resolved by restoring a backup — another reason to enable automated backups.\n\n**4. `Access denied for user 'root'@'localhost'`**\n\nForgotten root password or modified authentication plugin. Reset in skip-grant mode:\n\n```bash\nsystemctl stop mariadb\nmysqld_safe --skip-grant-tables &\nmariadb -u root\n```\n\nThen in the MariaDB shell:\n\n```sql\nFLUSH PRIVILEGES;\nALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';\nFLUSH PRIVILEGES;\nEXIT;\n```\n\nRestart MariaDB normally: `systemctl restart mariadb`.",{"type":99,"title":100,"headers":101,"rows":106},"comparison","MariaDB 11.4 LTS vs MariaDB 10.11 LTS vs MySQL 8.0",[102,103,104,105],"Criterion","MariaDB 11.4 LTS","MariaDB 10.11 LTS","MySQL 8.0",[107,111,116,121,126,130,135],[108,109,109,110],"Licence","GPL v2 (community)","GPL v2 \u002F Commercial (Oracle)",[112,113,114,115],"Support until","2028+ (LTS, May 2024)","February 2028 (LTS)","April 2026 (near EOL)",[117,118,119,120],"CLI client","`mariadb` (mysql deprecated)","`mariadb` and `mysql`","`mysql`",[122,123,124,125],"InnoDB performance","Improved (native threadpool)","Stable and proven","Good, Oracle-optimised",[127,128,128,129],"MySQL compatibility","Very high (drop-in)","Reference",[131,132,133,134],"Native JSON","Yes (MariaDB 10.2+)","Yes","Yes (JSON columns)",[136,137,138,139],"Recommendation","New projects, migrating from MySQL 8.0","Existing production, maximum stability","If Oracle\u002Fcloud-specific dependency",{"type":141,"body":142},"tip","Never expose port 3306 directly on the internet: configure your firewall to allow MariaDB connections only locally (127.0.0.1) or through an SSH tunnel. Also enable the slow query log (`slow_query_log = 1`, `long_query_time = 1`) from the start to quickly identify queries to optimise before they affect your users.",{"type":141,"title":144,"body":145},"The official documentation","For advanced configuration, tool-specific options and version changes, refer to the \u003Ca href=\"https:\u002F\u002Fmariadb.com\u002Fdocs\u002F\" target=\"_blank\" rel=\"noopener noreferrer\">official MariaDB documentation\u003C\u002Fa>. This guide covers going live on a ServOrbit VPS; the vendor documentation remains the reference for fine-tuning.","Deploy MariaDB in minutes on a ServOrbit Cloud VPS","Enjoy a high-performance VPS with 1-click MariaDB installation, full root access and support included — no-commitment monthly option, from 99 DH\u002Fmonth.","Launch my Cloud VPS","\u002Fvps-cloud",[151,170,194],{"id":152,"slug":153,"slugs":154,"title":158,"excerpt":159,"readTime":160,"views":18,"isPinned":19,"noindex":19,"publishedAt":161,"updatedAt":162,"category":163,"categories":164,"featuredImage":30,"bgImage":31,"posterImage":166,"relatedSolution":167},56,"postgresql-on-a-vps-a-reliable-and-controlled-database",{"fr":155,"en":153,"ar":156,"es":157},"heberger-postgresql-vps","postgresql-على-خادم-vps-قاعدة-بيانات-موثوقة-ومتحكم-بها","alojar-postgresql-en-un-vps","PostgreSQL on a VPS: reliable, controlled database","Host PostgreSQL on a VPS: production config, pgBackRest backups, streaming HA, RDS\u002FSupabase\u002FNeon comparison and OOM troubleshooting.",9,"2026-04-25T00:00:00+00:00","2026-10-21T15:21:37+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[165],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fheberger-postgresql-vps-poster.svg",{"categorySlug":168,"appSlug":169},"databases","postgresql-stack",{"id":171,"slug":172,"slugs":173,"title":177,"excerpt":178,"readTime":179,"views":180,"isPinned":19,"noindex":19,"publishedAt":181,"updatedAt":182,"category":183,"categories":188,"featuredImage":30,"bgImage":31,"posterImage":190,"relatedSolution":191},41,"deploy-your-applications-with-coolify-on-a-vps",{"fr":174,"en":172,"ar":175,"es":176},"deployer-avec-coolify","نشر-تطبيقاتك-باستخدام-coolify-على-vps","desplegar-aplicaciones-con-coolify-en-un-vps","Deploy Your Applications with Coolify on a VPS","Deploy Coolify on a VPS: installation, HTTPS configuration, Git connection, deploying your first application, databases, backups, and troubleshooting.",12,2,"2026-05-10T00:00:00+00:00","2026-10-31T01:54:10+00:00",{"id":184,"name":185,"slug":186,"color":187,"icon":186},3,"Deployment","deploiement","bg-success\u002F10 text-success",[189],{"id":184,"name":185,"slug":186,"color":187,"icon":186},"\u002Fblog\u002Fcovers\u002Fdeployer-avec-coolify-poster.svg",{"categorySlug":192,"appSlug":193},"application-deployment-devops","coolify",{"id":195,"slug":196,"slugs":197,"title":201,"excerpt":202,"readTime":203,"views":204,"isPinned":19,"noindex":19,"publishedAt":205,"updatedAt":206,"category":207,"categories":212,"featuredImage":30,"bgImage":31,"posterImage":214,"relatedSolution":215},73,"host-wordpress-on-your-own-vps",{"fr":198,"en":196,"ar":199,"es":200},"heberger-wordpress","استضافة-wordpress-على-خادم-vps-الخاص-بك","alojar-wordpress-en-un-vps","Host WordPress on your own VPS","Host WordPress on your VPS for maximum performance and control: Docker, MariaDB, caching, reverse proxy and SSL.",7,0,"2026-04-08T00:00:00+00:00","2026-11-09T20:55:18+00:00",{"id":203,"name":208,"slug":209,"color":210,"icon":211},"Self-hosting","self-hosting","bg-indigo-500\u002F10 text-indigo-400","cloud",[213],{"id":203,"name":208,"slug":209,"color":210,"icon":211},"\u002Fblog\u002Fcovers\u002Fheberger-wordpress-poster.svg",{"categorySlug":209,"appSlug":216},"wordpress",true,1794270442527]