Files

18 lines
14 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-oxmysql/Getting Started/issues">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-beta.21">
<link rel="search" type="application/opensearchdescription+xml" title="Overextended" href="/opensearch.xml"><title data-rh="true">Common Issues | Overextended</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://overextended.github.io/docs/oxmysql/Getting Started/issues"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Common Issues | Overextended"><meta data-rh="true" name="description" content="Unable to establish a connection"><meta data-rh="true" property="og:description" content="Unable to establish a connection"><link data-rh="true" rel="icon" href="/img/ox.ico"><link data-rh="true" rel="canonical" href="https://overextended.github.io/docs/oxmysql/Getting Started/issues"><link data-rh="true" rel="alternate" href="https://overextended.github.io/docs/oxmysql/Getting Started/issues" hreflang="en"><link data-rh="true" rel="alternate" href="https://overextended.github.io/docs/oxmysql/Getting Started/issues" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://8XXXVNJ7UW-dsn.algolia.net" crossorigin="anonymous"><link rel="stylesheet" href="/assets/css/styles.8b837b0a.css">
<link rel="preload" href="/assets/js/runtime~main.81f3545d.js" as="script">
<link rel="preload" href="/assets/js/main.6827ff74.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"dark")}()</script><div id="__docusaurus">
<div role="region"><a href="#" class="skipToContent_AAs2">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/ox_64.png" alt="Ox Logo" class="themedImage_TGiV themedImage--light_hEfu" height="32" width="32"><img src="/img/ox_64.png" alt="Ox Logo" class="themedImage_TGiV themedImage--dark_IVBJ" height="32" width="32"></div><b class="navbar__title text--truncate">Overextended</b></a><a href="https://www.github.com/overextended" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_HzUF"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://www.discord.gg/overextended" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_HzUF"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/">Documentation</a><div class="searchBox_q3Mz"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_HXQ2"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_AGDJ" type="button"></button><div class="docPage_UwMY"><aside class="theme-doc-sidebar-container docSidebarContainer_lBIm"><div class="sidebar_R2ge"><nav class="menu thin-scrollbar menu_nyNM"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs">← Documentation</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--active" aria-expanded="true" href="/docs/category/oxmysql">OxMySQL</a><button aria-label="Toggle the collapsible sidebar category &#x27;OxMySQL&#x27;" type="button" class="clean-btn menu__caret"></button></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--active" aria-expanded="true" tabindex="0" href="/docs/oxmysql/">Getting Started</a><button aria-label="Toggle the collapsible sidebar category &#x27;Getting Started&#x27;" type="button" class="clean-btn menu__caret"></button></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/oxmysql/Getting Started/benchmark">Benchmark</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/oxmysql/Getting Started/issues">Common Issues</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/oxmysql/Getting Started/placeholders">Placeholders</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" tabindex="0" href="/docs/oxmysql/Usage/">Usage</a><button aria-label="Toggle the collapsible sidebar category &#x27;Usage&#x27;" type="button" class="clean-btn menu__caret"></button></div></li></ul></li></ul></nav></div></aside><main class="docMainContainer_ZqYE"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_MuR7"><div class="docItemContainer_LiKe"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_LqIV" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_qK7i"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item"><a class="breadcrumbs__link" itemprop="item" href="/docs/category/oxmysql"><span itemprop="name">OxMySQL</span></a><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item"><a class="breadcrumbs__link" itemprop="item" href="/docs/oxmysql/"><span itemprop="name">Getting Started</span></a><meta itemprop="position" content="2"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Common Issues</span><meta itemprop="position" content="3"></li></ul></nav><div class="tocCollapsible_TEpM theme-doc-toc-mobile tocMobile_M1oX"><button type="button" class="clean-btn tocCollapsibleButton_r_O4">On this page</button></div><div class="theme-doc-markdown markdown"><h1>Common Issues</h1><h3 class="anchor anchorWithStickyNavbar_D9Kl" id="unable-to-establish-a-connection">Unable to establish a connection<a class="hash-link" href="#unable-to-establish-a-connection" title="Direct link to heading">​</a></h3><p>This is usually the result of incorrect database settings or your password containing reserved characters (<code>; , / ? : @ &amp; = + $ #</code>).</p><div class="admonition admonition-tip alert alert--success"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="16" viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Solution</h5></div><div class="admonition-content"><p>Ensure you have entered the correct database settings in the mysql_connection_string convar.<br>
<!-- -->You can try using the semicolon-separated format if your password contains reserved characters.</p></div></div><h3 class="anchor anchorWithStickyNavbar_D9Kl" id="no-such-export--in-resource-oxmysql">No such export ... in resource oxmysql<a class="hash-link" href="#no-such-export--in-resource-oxmysql" title="Direct link to heading">​</a></h3><p>Typically the result of failing to follow instructions.</p><div class="admonition admonition-tip alert alert--success"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="16" viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Solution</h5></div><div class="admonition-content"><p>Download the latest release <em>build</em> (not source) of oxmysql, and ensure it is starting before any resources that require it.</p></div></div><h3 class="anchor anchorWithStickyNavbar_D9Kl" id="numbers-treated-as-string">Numbers treated as string<a class="hash-link" href="#numbers-treated-as-string" title="Direct link to heading">​</a></h3><p>This is an incompatibility between mysqljs (used by mysql-async) and mysql2 (used by oxmysql) (See <a href="https://github.com/sidorares/node-mysql2/tree/master/documentation#known-incompatibilities-with-node-mysql" target="_blank" rel="noopener noreferrer">Known incompatibilities with node-mysql</a>)</p><p>To resolve this issue simply add <code>&amp;decimalNumbers=true</code> to the connection string, ie. <code>mysql://root@localhost/essentialmode?charset=utf8mb4_general_ci&amp;decimalNumbers=true</code> to revert to the behavior of mysqljs.</p><p>Do note with this that precision will be less with this, as Javascript treats all numbers as floats, so a double or decimal will be cast to a float this way.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/overextended/overextended.github.io/tree/main/docs/oxmysql/Getting Started/issues.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_YzTo" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_xdYa"><span class="theme-last-updated">Last updated<!-- --> on <b><time datetime="2022-06-30T08:46:43.000Z">6/30/2022</time></b></span></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/oxmysql/Getting Started/benchmark"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Benchmark</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/oxmysql/Getting Started/placeholders"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Placeholders</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_KORj thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#unable-to-establish-a-connection" class="table-of-contents__link toc-highlight">Unable to establish a connection</a></li><li><a href="#no-such-export--in-resource-oxmysql" class="table-of-contents__link toc-highlight">No such export ... in resource oxmysql</a></li><li><a href="#numbers-treated-as-string" class="table-of-contents__link toc-highlight">Numbers treated as string</a></li></ul></div></div></div></div></main></div></div></div>
<script src="/assets/js/runtime~main.81f3545d.js"></script>
<script src="/assets/js/main.6827ff74.js"></script>
</body>
</html>