{"id":22055,"date":"2026-06-11T11:34:01","date_gmt":"2026-06-11T11:34:01","guid":{"rendered":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/"},"modified":"2026-06-11T11:34:01","modified_gmt":"2026-06-11T11:34:01","slug":"fivem-oxmysql-database-guide","status":"publish","type":"post","link":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/","title":{"rendered":"FiveM oxmysql Database Guide: Connecting MySQL\/MariaDB"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Almost every modern FiveM roleplay framework \u2014 QBCore, ESX, and the ox ecosystem \u2014 depends on a database, and the resource that talks to that database is <code>oxmysql<\/code>. It is the maintained MySQL\/MariaDB wrapper from Overextended, and it replaced the older mysql-async and ghmattimysql resources you may still see referenced in old tutorials. If your server logs are full of &#8220;database not connected&#8221; errors, or players lose their characters on restart, the cause is almost always a misconfigured connection string. This guide walks through installing oxmysql, building a correct <code>mysql_connection_string<\/code>, managing your database with HeidiSQL, and using the query handlers in your own scripts.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What oxmysql is and why you need it<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">oxmysql is a standalone FXServer resource that opens a connection pool to your MySQL or MariaDB database and exposes query functions to every other resource on the server. Frameworks list it as a dependency in their <code>fxmanifest.lua<\/code>, so it must start <strong>before<\/strong> anything that uses it. It automatically uses prepared statements, which sanitises parameters and protects against SQL injection \u2014 a big reason not to hand-roll your own database code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both MySQL and MariaDB work. MariaDB is a drop-in MySQL fork and is what most Linux-based FiveM hosts ship by default; the connection string format is identical for both. If you are still choosing where to run your server, see our <a href=\"https:\/\/xgamingserver.com\/five-m-server-hosting\">managed FiveM hosting plans<\/a>, which come with a database ready to go so you can skip most of the setup below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Install oxmysql<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Download the latest release from the official Overextended oxmysql GitHub releases page. Use the packaged release, not the source ZIP.<\/li>\n<li>Extract it and rename the folder to exactly <code>oxmysql<\/code> (no version numbers or trailing characters), then drop it into your <code>resources<\/code> folder.<\/li>\n<li>Add it to your <code>server.cfg<\/code> and make sure it starts before any dependent resource \u2014 it is usually the very first thing you start.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code># server.cfg \u2014 start oxmysql before frameworks and scripts\nensure oxmysql\nensure es_extended   # or qb-core, etc. \u2014 must come AFTER oxmysql<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use <code>ensure<\/code> rather than <code>start<\/code> so the resource restarts cleanly if it stops. If you run multiple frameworks or a custom load order, confirm against the current docs, because resource names occasionally change between major versions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Set the mysql_connection_string convar<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">oxmysql reads its database credentials from a single convar, <code>mysql_connection_string<\/code>, which you set in <code>server.cfg<\/code>. The docs support two interchangeable formats: a URI style and a semicolon-separated key\/value style. Pick whichever your credentials work with.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># URI format\nset mysql_connection_string \"mysql:\/\/root:12345@localhost:3306\/es_extended\"\n\n# Semicolon \/ key-value format\nset mysql_connection_string \"user=root;password=12345;host=localhost;port=3306;database=es_extended\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>root<\/code>, the password, <code>localhost<\/code>, the port (<code>3306<\/code> is the MySQL\/MariaDB default), and the database name with your own values. Use <code>set<\/code>, never <code>setr<\/code> \u2014 <code>setr<\/code> replicates the value to clients, which would leak your database password to every player who connects.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A very common gotcha is a password containing reserved characters. Characters such as <code>; , \/ ? : @ & = + $ #<\/code> can break a connection string. If your connection fails and the password contains any of these, the simplest fix is to switch to the other connection string format, or change the password to alphanumeric-only characters. The full list of caveats is documented on coxdocs.dev \/ overextended.dev \u2014 check it if you hit edge cases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Manage your database with HeidiSQL<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">HeidiSQL is the free Windows tool most FiveM admins use to create databases, import framework SQL files, and inspect player data. To connect, open HeidiSQL, create a new session, and enter the same host, user, password, and port you put in your connection string. Once connected you can create the database (for example <code>es_extended<\/code> or <code>qbcore<\/code>) and import the <code>.sql<\/code> file shipped with your framework.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Hostname \/ IP:<\/strong> the same host as your connection string (often <code>127.0.0.1<\/code> locally).<\/li>\n<li><strong>User &#038; Password:<\/strong> match the credentials in <code>mysql_connection_string<\/code>.<\/li>\n<li><strong>Port:<\/strong> <code>3306<\/code> unless your host uses a custom port.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">On a managed host you&#8217;ll usually be given these details (and sometimes phpMyAdmin instead of HeidiSQL). Linux server admins can use the <code>mysql<\/code> CLI or DBeaver, which work the same way cross-platform.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Verify the connection<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Start the server and watch the console. A healthy oxmysql start logs a message confirming it established a connection to your database and the MySQL\/MariaDB version. If you instead see authentication or &#8220;unable to connect&#8221; errors, work through this checklist:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Symptom<\/th><th>Likely cause<\/th><th>Fix<\/th><\/tr><\/thead><tbody><tr><td>Access denied for user<\/td><td>Wrong user\/password<\/td><td>Re-check credentials in HeidiSQL, then mirror them in the convar<\/td><\/tr><tr><td>Can&#8217;t connect \/ timeout<\/td><td>Wrong host or port, DB not running<\/td><td>Confirm host\/port; ensure MySQL\/MariaDB service is started<\/td><\/tr><tr><td>Unknown database<\/td><td>Database name doesn&#8217;t exist<\/td><td>Create it in HeidiSQL and import the framework SQL<\/td><\/tr><tr><td>Password parse errors<\/td><td>Reserved characters in password<\/td><td>Swap connection string format or use an alphanumeric password<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Using oxmysql query handlers in your scripts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">oxmysql exposes a set of query functions for your own server-side Lua, JS, or C# resources. The main handlers documented by Overextended include <code>query<\/code>, <code>scalar<\/code>, <code>single<\/code>, <code>insert<\/code>, <code>update<\/code>, <code>prepare<\/code>, and <code>transaction<\/code>. Each has an asynchronous (callback) form and an <code>.await<\/code> form for use inside a coroutine.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>MySQL.query<\/code> \u2014 returns all matching rows; for non-SELECT statements returns metadata like <code>insertId<\/code> and <code>affectedRows<\/code>.<\/li>\n<li><code>MySQL.single<\/code> \u2014 returns the first matching row only.<\/li>\n<li><code>MySQL.scalar<\/code> \u2014 returns a single value from the first column of the first row.<\/li>\n<li><code>MySQL.insert<\/code> \u2014 runs an INSERT and returns the new <code>insertId<\/code>.<\/li>\n<li><code>MySQL.prepare<\/code> \u2014 runs a frequently-called query faster and accepts multiple parameter sets.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Server-side Lua example (await form)\nlocal player = MySQL.single.await(\n  'SELECT * FROM users WHERE identifier = ?',\n  { source_identifier }\n)\n\nlocal count = MySQL.scalar.await('SELECT COUNT(*) FROM users')<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Always pass values as the second parameter array rather than concatenating them into the query string \u2014 that is what makes the prepared-statement protection work. Function signatures and the exact mysql-async backwards-compatibility layer are version-dependent, so confirm names and arguments in the current oxmysql function docs before shipping a script.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With the database connected you can move on to the rest of your stack: see our walkthroughs for <a href=\"https:\/\/xgamingserver.com\/blog\/how-to-install-qbcore-on-fivem\/\">installing QBCore<\/a> and <a href=\"https:\/\/xgamingserver.com\/blog\/fivem-ox-inventory-setup-guide\/\">setting up ox_inventory<\/a>, both of which require oxmysql to be running first. The official FiveM database docs and our <a href=\"https:\/\/xgamingserver.com\/docs\/fivem\">FiveM setup documentation<\/a> are good references when something doesn&#8217;t line up.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Where do I set the oxmysql connection string?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In your <code>server.cfg<\/code> using the <code>set mysql_connection_string<\/code> convar. Use <code>set<\/code> (server-only) and never <code>setr<\/code>, because <code>setr<\/code> replicates the value \u2014 including your password \u2014 to connected clients.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does oxmysql work with MariaDB?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. MariaDB is a MySQL-compatible fork and uses the same connection string format. Most Linux FiveM hosts ship MariaDB by default, and oxmysql connects to it exactly as it does to MySQL.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why does my server say the database isn&#8217;t connected?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The usual causes are wrong credentials, a database that doesn&#8217;t exist yet, the MySQL\/MariaDB service not running, or reserved characters in the password breaking the connection string. Verify the credentials in HeidiSQL first, then mirror them exactly in your convar, and make sure <code>ensure oxmysql<\/code> appears before dependent resources.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Almost every modern FiveM roleplay framework \u2014 QBCore, ESX, and the ox ecosystem \u2014 depends on a database, and the resource that talks to that database is oxmysql. It is the maintained MySQL\/MariaDB wrapper from Overextended, and it replaced the older mysql-async and ghmattimysql resources you may still see referenced in old tutorials. If your [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":22045,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_gspb_post_css":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[142],"tags":[],"class_list":["post-22055","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fivem"],"blocksy_meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.5 (Yoast SEO v26.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>FiveM oxmysql Database Guide (MySQL\/MariaDB) 2026<\/title>\n<meta name=\"description\" content=\"Connect your FiveM server to MySQL\/MariaDB with oxmysql. Set mysql_connection_string, use HeidiSQL, and run query handlers the right way.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FiveM oxmysql Database Guide: Connecting MySQL\/MariaDB\" \/>\n<meta property=\"og:description\" content=\"Connect your FiveM server to MySQL\/MariaDB with oxmysql. Set mysql_connection_string, use HeidiSQL, and run query handlers the right way.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"XGamingServer\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/web.facebook.com\/xgamingserver69\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-11T11:34:01+00:00\" \/>\n<meta name=\"author\" content=\"Hectar Carson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@xgamingserver\" \/>\n<meta name=\"twitter:site\" content=\"@xgamingserver\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hectar Carson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/\"},\"author\":{\"name\":\"Hectar Carson\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/561042c617869348e75abfe16a269f8d\"},\"headline\":\"FiveM oxmysql Database Guide: Connecting MySQL\/MariaDB\",\"datePublished\":\"2026-06-11T11:34:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/\"},\"wordCount\":1049,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/06\/fivem-1.webp\",\"articleSection\":[\"FiveM\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/\",\"url\":\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/\",\"name\":\"FiveM oxmysql Database Guide (MySQL\/MariaDB) 2026\",\"isPartOf\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/06\/fivem-1.webp\",\"datePublished\":\"2026-06-11T11:34:01+00:00\",\"description\":\"Connect your FiveM server to MySQL\/MariaDB with oxmysql. Set mysql_connection_string, use HeidiSQL, and run query handlers the right way.\",\"breadcrumb\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#primaryimage\",\"url\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/06\/fivem-1.webp\",\"contentUrl\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/06\/fivem-1.webp\",\"width\":640,\"height\":360},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/xgamingserver.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FiveM\",\"item\":\"https:\/\/xgamingserver.com\/blog\/category\/fivem\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"FiveM oxmysql Database Guide: Connecting MySQL\/MariaDB\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#website\",\"url\":\"https:\/\/xgamingserver.com\/blog\/\",\"name\":\"XGamingServer\",\"description\":\"Dedicated Game Server Hosting\",\"publisher\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/xgamingserver.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#organization\",\"name\":\"XGamingServer\",\"url\":\"https:\/\/xgamingserver.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2020\/09\/logo.svg\",\"contentUrl\":\"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2020\/09\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"XGamingServer\"},\"image\":{\"@id\":\"https:\/\/xgamingserver.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/web.facebook.com\/xgamingserver69\/\",\"https:\/\/x.com\/xgamingserver\",\"https:\/\/www.instagram.com\/xgamingserver\/\",\"https:\/\/www.linkedin.com\/company\/xgamingserver\/\",\"https:\/\/www.pinterest.com\/xgamingserver\/\",\"https:\/\/www.youtube.com\/channel\/UCHnOtWxpzaL2r3jM9Jm40EQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/561042c617869348e75abfe16a269f8d\",\"name\":\"Hectar Carson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1cbcd42dac6c5f21cb52dd64f03fd442250a15f7bb1ade04e23002eb5b384de5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1cbcd42dac6c5f21cb52dd64f03fd442250a15f7bb1ade04e23002eb5b384de5?s=96&d=mm&r=g\",\"caption\":\"Hectar Carson\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"FiveM oxmysql Database Guide (MySQL\/MariaDB) 2026","description":"Connect your FiveM server to MySQL\/MariaDB with oxmysql. Set mysql_connection_string, use HeidiSQL, and run query handlers the right way.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/","og_locale":"en_US","og_type":"article","og_title":"FiveM oxmysql Database Guide: Connecting MySQL\/MariaDB","og_description":"Connect your FiveM server to MySQL\/MariaDB with oxmysql. Set mysql_connection_string, use HeidiSQL, and run query handlers the right way.","og_url":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/","og_site_name":"XGamingServer","article_publisher":"https:\/\/web.facebook.com\/xgamingserver69\/","article_published_time":"2026-06-11T11:34:01+00:00","author":"Hectar Carson","twitter_card":"summary_large_image","twitter_creator":"@xgamingserver","twitter_site":"@xgamingserver","twitter_misc":{"Written by":"Hectar Carson","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#article","isPartOf":{"@id":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/"},"author":{"name":"Hectar Carson","@id":"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/561042c617869348e75abfe16a269f8d"},"headline":"FiveM oxmysql Database Guide: Connecting MySQL\/MariaDB","datePublished":"2026-06-11T11:34:01+00:00","mainEntityOfPage":{"@id":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/"},"wordCount":1049,"commentCount":0,"publisher":{"@id":"https:\/\/xgamingserver.com\/blog\/#organization"},"image":{"@id":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/06\/fivem-1.webp","articleSection":["FiveM"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/","url":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/","name":"FiveM oxmysql Database Guide (MySQL\/MariaDB) 2026","isPartOf":{"@id":"https:\/\/xgamingserver.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#primaryimage"},"image":{"@id":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/06\/fivem-1.webp","datePublished":"2026-06-11T11:34:01+00:00","description":"Connect your FiveM server to MySQL\/MariaDB with oxmysql. Set mysql_connection_string, use HeidiSQL, and run query handlers the right way.","breadcrumb":{"@id":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#primaryimage","url":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/06\/fivem-1.webp","contentUrl":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/06\/fivem-1.webp","width":640,"height":360},{"@type":"BreadcrumbList","@id":"https:\/\/xgamingserver.com\/blog\/fivem-oxmysql-database-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/xgamingserver.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FiveM","item":"https:\/\/xgamingserver.com\/blog\/category\/fivem\/"},{"@type":"ListItem","position":3,"name":"FiveM oxmysql Database Guide: Connecting MySQL\/MariaDB"}]},{"@type":"WebSite","@id":"https:\/\/xgamingserver.com\/blog\/#website","url":"https:\/\/xgamingserver.com\/blog\/","name":"XGamingServer","description":"Dedicated Game Server Hosting","publisher":{"@id":"https:\/\/xgamingserver.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/xgamingserver.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/xgamingserver.com\/blog\/#organization","name":"XGamingServer","url":"https:\/\/xgamingserver.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/xgamingserver.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2020\/09\/logo.svg","contentUrl":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2020\/09\/logo.svg","width":"1024","height":"1024","caption":"XGamingServer"},"image":{"@id":"https:\/\/xgamingserver.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/web.facebook.com\/xgamingserver69\/","https:\/\/x.com\/xgamingserver","https:\/\/www.instagram.com\/xgamingserver\/","https:\/\/www.linkedin.com\/company\/xgamingserver\/","https:\/\/www.pinterest.com\/xgamingserver\/","https:\/\/www.youtube.com\/channel\/UCHnOtWxpzaL2r3jM9Jm40EQ"]},{"@type":"Person","@id":"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/561042c617869348e75abfe16a269f8d","name":"Hectar Carson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/xgamingserver.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1cbcd42dac6c5f21cb52dd64f03fd442250a15f7bb1ade04e23002eb5b384de5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1cbcd42dac6c5f21cb52dd64f03fd442250a15f7bb1ade04e23002eb5b384de5?s=96&d=mm&r=g","caption":"Hectar Carson"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/xgamingserver.com\/blog\/wp-content\/uploads\/2026\/06\/fivem-1.webp","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/posts\/22055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/comments?post=22055"}],"version-history":[{"count":0,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/posts\/22055\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/media\/22045"}],"wp:attachment":[{"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/media?parent=22055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/categories?post=22055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xgamingserver.com\/blog\/wp-json\/wp\/v2\/tags?post=22055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}