mirror of
https://github.com/pterodactyl/documentation.git
synced 2025-12-11 05:44:45 -06:00
79 lines
24 KiB
HTML
79 lines
24 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-US">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<title>Setting up MySQL | Pterodactyl</title>
|
|
<meta name="generator" content="VuePress 1.5.4">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
|
|
<link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32">
|
|
<link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16">
|
|
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#0e4688">
|
|
<link rel="manifest" href="/favicons/site.webmanifest">
|
|
<link rel="shortcut icon" href="/favicons/favicon.ico">
|
|
<meta name="description" content="Pterodactyl is an open-source game server management panel built with PHP 7, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.">
|
|
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
|
|
<meta name="theme-color" content="#0e4688">
|
|
<link rel="preload" href="/assets/css/0.styles.26db9e46.css" as="style"><link rel="preload" href="/assets/js/app.5ed11237.js" as="script"><link rel="preload" href="/assets/js/4.cda5f594.js" as="script"><link rel="preload" href="/assets/js/1.d27374d7.js" as="script"><link rel="preload" href="/assets/js/75.bc6f52b4.js" as="script"><link rel="prefetch" href="/assets/js/10.bcaf3754.js"><link rel="prefetch" href="/assets/js/11.e5240661.js"><link rel="prefetch" href="/assets/js/12.bc37074e.js"><link rel="prefetch" href="/assets/js/13.d96e5a31.js"><link rel="prefetch" href="/assets/js/14.2b6a0c7b.js"><link rel="prefetch" href="/assets/js/15.dcb97977.js"><link rel="prefetch" href="/assets/js/16.f2393fa3.js"><link rel="prefetch" href="/assets/js/17.403d3937.js"><link rel="prefetch" href="/assets/js/18.a38a22c6.js"><link rel="prefetch" href="/assets/js/19.2909f3bf.js"><link rel="prefetch" href="/assets/js/2.17b53296.js"><link rel="prefetch" href="/assets/js/20.2b0e82e7.js"><link rel="prefetch" href="/assets/js/21.de639223.js"><link rel="prefetch" href="/assets/js/22.ba247afa.js"><link rel="prefetch" href="/assets/js/23.6388ee5d.js"><link rel="prefetch" href="/assets/js/24.a7d8bd12.js"><link rel="prefetch" href="/assets/js/25.a18e760a.js"><link rel="prefetch" href="/assets/js/26.ce110c77.js"><link rel="prefetch" href="/assets/js/27.1bc51cad.js"><link rel="prefetch" href="/assets/js/28.45d4fe86.js"><link rel="prefetch" href="/assets/js/29.1cc47d12.js"><link rel="prefetch" href="/assets/js/30.831cc1fd.js"><link rel="prefetch" href="/assets/js/31.55c4be08.js"><link rel="prefetch" href="/assets/js/32.86eddebf.js"><link rel="prefetch" href="/assets/js/33.257d9d0e.js"><link rel="prefetch" href="/assets/js/34.fead0e36.js"><link rel="prefetch" href="/assets/js/35.bc9ceac9.js"><link rel="prefetch" href="/assets/js/36.0050a325.js"><link rel="prefetch" href="/assets/js/37.13038a4c.js"><link rel="prefetch" href="/assets/js/38.7687dfa0.js"><link rel="prefetch" href="/assets/js/39.b4cd4648.js"><link rel="prefetch" href="/assets/js/40.04b12ca0.js"><link rel="prefetch" href="/assets/js/41.c2275e99.js"><link rel="prefetch" href="/assets/js/42.b62aa882.js"><link rel="prefetch" href="/assets/js/43.f9c88a30.js"><link rel="prefetch" href="/assets/js/44.d08991a7.js"><link rel="prefetch" href="/assets/js/45.f1a12be4.js"><link rel="prefetch" href="/assets/js/46.ca2282dc.js"><link rel="prefetch" href="/assets/js/47.37177763.js"><link rel="prefetch" href="/assets/js/48.264a4203.js"><link rel="prefetch" href="/assets/js/49.467bb35d.js"><link rel="prefetch" href="/assets/js/5.7eab6273.js"><link rel="prefetch" href="/assets/js/50.56f9cafe.js"><link rel="prefetch" href="/assets/js/51.591e996b.js"><link rel="prefetch" href="/assets/js/52.d8a55dab.js"><link rel="prefetch" href="/assets/js/53.49cf15bb.js"><link rel="prefetch" href="/assets/js/54.9cf0343b.js"><link rel="prefetch" href="/assets/js/55.38afd6c1.js"><link rel="prefetch" href="/assets/js/56.7c20f0d9.js"><link rel="prefetch" href="/assets/js/57.bf8211fd.js"><link rel="prefetch" href="/assets/js/58.4d4d61ab.js"><link rel="prefetch" href="/assets/js/59.8b2e0e29.js"><link rel="prefetch" href="/assets/js/6.f86bc75a.js"><link rel="prefetch" href="/assets/js/60.f1fb5037.js"><link rel="prefetch" href="/assets/js/61.1111872b.js"><link rel="prefetch" href="/assets/js/62.5f8f5d5e.js"><link rel="prefetch" href="/assets/js/63.818b0c85.js"><link rel="prefetch" href="/assets/js/64.c9825ab0.js"><link rel="prefetch" href="/assets/js/65.c8ff65d1.js"><link rel="prefetch" href="/assets/js/66.6eb152b3.js"><link rel="prefetch" href="/assets/js/67.4a6e498c.js"><link rel="prefetch" href="/assets/js/68.da47c92a.js"><link rel="prefetch" href="/assets/js/69.5b1543d7.js"><link rel="prefetch" href="/assets/js/7.4a1def3b.js"><link rel="prefetch" href="/assets/js/70.31ac2858.js"><link rel="prefetch" href="/assets/js/71.21185529.js"><link rel="prefetch" href="/assets/js/72.0f099e82.js"><link rel="prefetch" href="/assets/js/73.afbaa1a8.js"><link rel="prefetch" href="/assets/js/74.80dd8d0e.js"><link rel="prefetch" href="/assets/js/76.f3d105b7.js"><link rel="prefetch" href="/assets/js/77.c8845eb4.js"><link rel="prefetch" href="/assets/js/8.ece8e8ed.js"><link rel="prefetch" href="/assets/js/9.ec68f296.js">
|
|
<link rel="stylesheet" href="/assets/css/0.styles.26db9e46.css">
|
|
</head>
|
|
<body>
|
|
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="nav"><div class="sidebar-button block md:hidden flex-no-shrink"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <div class="logo-container"><a href="/" class="home-link router-link-active"><img src="/logos/pterry.svg" class="logo"> <span class="site-name hidden md:inline can-hide">Pterodactyl</span></a></div> <div class="w-full"><div class="flex"><div class="search-box"><input aria-label="Search" placeholder="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links flex-no-shrink hidden md:flex"><div class="nav-item"><a href="/project/introduction.html" class="nav-link">Documentation
|
|
</a></div><div class="nav-item"><a href="/community/about.html" class="nav-link">Community Guides
|
|
</a></div><div class="nav-item"><a href="https://discord.gg/pterodactyl" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
|
Get Help
|
|
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><a href="https://dashflo.net/docs/api/pterodactyl/v1/" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
|
API
|
|
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <div class="nav-item"><a href="https://github.com/pterodactyl/panel" target="_blank" rel="noopener noreferrer" class="nav-link">
|
|
Contribute
|
|
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></nav></div></div></header> <div class="sidebar-mask"></div> <div class="sidebar"><nav class="nav-links flex-no-shrink block md:hidden"><div class="nav-item"><a href="/project/introduction.html" class="nav-link">Documentation
|
|
</a></div><div class="nav-item"><a href="/community/about.html" class="nav-link">Community Guides
|
|
</a></div><div class="nav-item"><a href="https://discord.gg/pterodactyl" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
|
Get Help
|
|
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><a href="https://dashflo.net/docs/api/pterodactyl/v1/" target="_blank" rel="noopener noreferrer" class="nav-link external">
|
|
API
|
|
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <div class="nav-item"><a href="https://github.com/pterodactyl/panel" target="_blank" rel="noopener noreferrer" class="nav-link">
|
|
Contribute
|
|
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></nav> <ul class="sidebar-links"><li><div class="sidebar-group first"><p class="sidebar-heading"><span>Project Information</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/project/introduction.html" class="sidebar-link">Introduction</a></li><li><a href="/project/about.html" class="sidebar-link">About</a></li><li><a href="/project/terms.html" class="sidebar-link">Terminology</a></li><li><a href="/project/community.html" class="sidebar-link">Community Standards</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Panel</span> <!----> <div tabindex="0" class="version-select custom-select float-right"><div class="selected"><div class="inline-block">
|
|
1.2
|
|
<span class="rounded-full ml-2 text-green-dark">current</span></div> <span class="arrow"></span></div> <div class="items hidden"><div class="item"><div class="inline-block">
|
|
1.2
|
|
<span class="rounded-full ml-2 text-green-dark">current</span></div></div></div></div></p> <ul class="sidebar-group-items"><li><a href="/panel/1.0/getting_started.html" class="sidebar-link">Getting Started</a></li><li><a href="/panel/1.0/webserver_configuration.html" class="sidebar-link">Webserver Configuration</a></li><li><a href="/panel/1.0/upgrading.html" class="sidebar-link">Upgrading</a></li><li><a href="/panel/1.0/additional_configuration.html" class="sidebar-link">Additional Configuration</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Wings</span> <!----> <div tabindex="0" class="version-select custom-select float-right"><div class="selected"><div class="inline-block">
|
|
1.2
|
|
<span class="rounded-full ml-2 text-green-dark">current</span></div> <span class="arrow"></span></div> <div class="items hidden"><div class="item"><div class="inline-block">
|
|
1.2
|
|
<span class="rounded-full ml-2 text-green-dark">current</span></div></div></div></div></p> <ul class="sidebar-group-items"><li><a href="/wings/1.0/installing.html" class="sidebar-link">Installing Wings</a></li><li><a href="/wings/1.0/upgrading.html" class="sidebar-link">Upgrading Wings</a></li><li><a href="/wings/1.0/migrating.html" class="sidebar-link">Migrating to Wings</a></li><li><a href="/wings/1.0/configuration.html" class="sidebar-link">Additional Configuration</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading open"><span>Tutorials</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/tutorials/mysql_setup.html" class="active sidebar-link">Setting up MySQL</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/tutorials/mysql_setup.html#creating-a-database-for-pterodactyl" class="sidebar-link">Creating a database for Pterodactyl</a></li><li class="sidebar-sub-header"><a href="/tutorials/mysql_setup.html#creating-a-database-host-for-nodes" class="sidebar-link">Creating a Database Host for Nodes</a></li></ul></li><li><a href="/tutorials/creating_ssl_certificates.html" class="sidebar-link">Creating SSL Certificates</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Guides</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/guides/mounts.html" class="sidebar-link">Using Mounts</a></li></ul></div></li><li><div class="sidebar-group collapsable"><p class="sidebar-heading"><span>Development & Ops</span> <span class="arrow right"></span> <!----></p> <!----></div></li></ul> </div> <div class="page"> <div class="content content__default"><h1 id="setting-up-mysql"><a href="#setting-up-mysql" class="header-anchor">#</a> Setting up MySQL</h1> <p></p><div class="table-of-contents"><ul><li><a href="#creating-a-database-for-pterodactyl">Creating a database for Pterodactyl</a><ul><li><a href="#logging-in">Logging In</a></li><li><a href="#creating-a-user">Creating a user</a></li><li><a href="#create-a-database">Create a database</a></li><li><a href="#assigning-permissions">Assigning permissions</a></li></ul></li><li><a href="#creating-a-database-host-for-nodes">Creating a Database Host for Nodes</a><ul><li><a href="#creating-a-user">Creating a user</a></li><li><a href="#assigning-permissions">Assigning permissions</a></li><li><a href="#allowing-external-database-access">Allowing external database access</a></li></ul></li></ul></div><p></p> <h2 id="creating-a-database-for-pterodactyl"><a href="#creating-a-database-for-pterodactyl" class="header-anchor">#</a> Creating a database for Pterodactyl</h2> <p>MySQL is a core component of Pterodactyl Panel but it can be confusing to setup and use if you've never done so before.
|
|
This is a very basic tutorial that skims just enough of the surface to set MySQL up and running with the panel.
|
|
If you're interested in learning more, there are some great tutorials available on the Internet.</p> <h3 id="logging-in"><a href="#logging-in" class="header-anchor">#</a> Logging In</h3> <p>The first step in this process is to login to the MySQL command line where we will be executing some statements to get
|
|
things setup. To do so, simply run the command below and provide the Root MySQL account's password that you setup when
|
|
installing MySQL. If you do not remember doing this, chances are you can just hit enter as no password is set.</p> <div class="language-bash extra-class"><pre class="language-bash"><code>mysql -u root -p
|
|
</code></pre></div><h3 id="creating-a-user"><a href="#creating-a-user" class="header-anchor">#</a> Creating a user</h3> <p>For security sake, and due to changes in MySQL 5.7, you'll need to create a new user for the panel. To do so, we want
|
|
to first tell MySQL to use the mysql database, which stores such information.</p> <p>Next, we will create a user called <code>pterodactyl</code> and allow logins from localhost which prevents any external connections
|
|
to our database. You can also use <code>%</code> as a wildcard or enter a numeric IP. We will also set the account password
|
|
to <code>somePassword</code>.</p> <div class="language-sql extra-class"><pre class="language-sql"><code><span class="token keyword">USE</span> mysql<span class="token punctuation">;</span>
|
|
|
|
<span class="token comment"># Remember to change 'somePassword' below to be a unique password specific to this account.</span>
|
|
<span class="token keyword">CREATE</span> <span class="token keyword">USER</span> <span class="token string">'pterodactyl'</span><span class="token variable">@'127.0.0.1'</span> IDENTIFIED <span class="token keyword">WITH</span> mysql_native_password <span class="token keyword">BY</span> <span class="token string">'somePassword'</span><span class="token punctuation">;</span>
|
|
</code></pre></div><h3 id="create-a-database"><a href="#create-a-database" class="header-anchor">#</a> Create a database</h3> <p>Next, we need to create a database for the panel. In this tutorial we will be naming the database <code>panel</code>, but you can
|
|
substitute that for whatever name you wish.</p> <div class="language-sql extra-class"><pre class="language-sql"><code><span class="token keyword">CREATE</span> <span class="token keyword">DATABASE</span> panel<span class="token punctuation">;</span>
|
|
</code></pre></div><h3 id="assigning-permissions"><a href="#assigning-permissions" class="header-anchor">#</a> Assigning permissions</h3> <p>Finally, we need to tell MySQL that our pterodactyl user should have access to the panel database. To do this, simply
|
|
run the command below. If you plan on also using this MySQL instance as a database host on the Panel you'll want to
|
|
include the <code>WITH GRANT OPTION</code> (which we are doing here). If you won't be using this user as part of the host setup
|
|
you can remove that.</p> <div class="language-sql extra-class"><pre class="language-sql"><code><span class="token keyword">GRANT</span> <span class="token keyword">ALL</span> <span class="token keyword">PRIVILEGES</span> <span class="token keyword">ON</span> panel<span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">TO</span> <span class="token string">'pterodactyl'</span><span class="token variable">@'127.0.0.1'</span> <span class="token keyword">WITH</span> <span class="token keyword">GRANT</span> <span class="token keyword">OPTION</span><span class="token punctuation">;</span>
|
|
FLUSH <span class="token keyword">PRIVILEGES</span><span class="token punctuation">;</span>
|
|
</code></pre></div><h2 id="creating-a-database-host-for-nodes"><a href="#creating-a-database-host-for-nodes" class="header-anchor">#</a> Creating a Database Host for Nodes</h2> <div class="custom-block tip"><p class="custom-block-title">TIP</p> <p>This section covers creating a MySQL user that has permission to create and modify users. This allows the Panel to create per-server databases on the given host.</p></div> <h3 id="creating-a-user-2"><a href="#creating-a-user-2" class="header-anchor">#</a> Creating a user</h3> <p>If your database is on a different host than the one where your Panel or Daemon is installed make sure to use the IP address of the machine the Panel is running on. If you use <code>127.0.0.1</code> and try to connect externally, you will receive a connection refused error.</p> <div class="language-sql extra-class"><pre class="language-sql"><code><span class="token keyword">USE</span> mysql<span class="token punctuation">;</span>
|
|
|
|
<span class="token comment"># You should change the username and password below to something unique.</span>
|
|
<span class="token keyword">CREATE</span> <span class="token keyword">USER</span> <span class="token string">'pterodactyluser'</span><span class="token variable">@'127.0.0.1'</span> IDENTIFIED <span class="token keyword">BY</span> <span class="token string">'somepassword'</span><span class="token punctuation">;</span>
|
|
</code></pre></div><h3 id="assigning-permissions-2"><a href="#assigning-permissions-2" class="header-anchor">#</a> Assigning permissions</h3> <p>The command below will give your newly created user the ability to create additional users, as well as create and destroy databases. As above, ensure <code>127.0.0.1</code> matches the IP address you used in the previous command.</p> <div class="language-sql extra-class"><pre class="language-sql"><code><span class="token keyword">GRANT</span> <span class="token keyword">ALL</span> <span class="token keyword">PRIVILEGES</span> <span class="token keyword">ON</span> <span class="token operator">*</span><span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">TO</span> <span class="token string">'pterodactyluser'</span><span class="token variable">@'127.0.0.1'</span> <span class="token keyword">WITH</span> <span class="token keyword">GRANT</span> <span class="token keyword">OPTION</span><span class="token punctuation">;</span>
|
|
FLUSH <span class="token keyword">PRIVILEGES</span><span class="token punctuation">;</span>
|
|
</code></pre></div><h3 id="allowing-external-database-access"><a href="#allowing-external-database-access" class="header-anchor">#</a> Allowing external database access</h3> <p>Chances are you'll need to allow external access to this MySQL instance in order to allow servers to connect to it. To do this, open <code>my.cnf</code>, which varies in location depending on your OS and how MySQL was installed.</p> <p>More recent versions of MySQL have moved the default configuration to <code>mysql.conf.d/mysqld.cnf</code> or for MariaDB installations the default configuration should be in <code>50-server.cnf</code>. <em>However</em>, <code>my.cnf</code> has been changed to update the default configurations so you don't edit your default configuration files (this is now considered bad practice)!</p> <p>If you open <code>my.cnf</code>, you'll want to add the lines:</p> <div class="language- extra-class"><pre class="language-text"><code>[mysqld]
|
|
bind-address=0.0.0.0
|
|
</code></pre></div><p>This will override the default MySQL configuration, which by default will only accept requests from lo. Updating this will allow connections on all interfaces, and thus, external connections.</p> <p>If your Node and Daemon are on the same machine, and you won't be needing external access, you can also use the <code>docker0</code> interface IP address, rather than <code>127.0.0.1</code>. This IP address can be found by running <code>ip addr | grep docker0</code>, and it likely looks something like <code>172.x.x.x</code>.</p></div> <div class="page-edit"><div class="edit-link"><a href="https://github.com/pterodactyl/documentation/edit/master/tutorials/mysql_setup.md" target="_blank" rel="noopener noreferrer">Help us improve this page.</a> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></div> <!----></div> <div class="page-nav"><p class="inner"></p> <div class="prev"><span>
|
|
←
|
|
<a href="/project/community.html">Community Standards</a></span></div> <div class="next"><span><a href="/tutorials/creating_ssl_certificates.html">Creating SSL Certificates</a>→
|
|
</span></div></div> </div></div><div class="global-ui"></div></div>
|
|
<script src="/assets/js/app.5ed11237.js" defer></script><script src="/assets/js/4.cda5f594.js" defer></script><script src="/assets/js/1.d27374d7.js" defer></script><script src="/assets/js/75.bc6f52b4.js" defer></script>
|
|
</body>
|
|
</html>
|