App overview screenshotSQL and Database Guides
Try our free SQL Client
Connecting to MySQL
Connecting to Drivers
Installing MySQL
Setting up MySQL
MySQL   >   
Setting up MySQL   >   
MySQL on Railway

How To Setup MySQL on Railway

MySQL is one of the most popular database systems available today. In this guide, we’ll walk you through how to set up and connect to MySQL from the popular database hosting infrastructure Railway.

Creating a new Project with MySQL on Railway

Log in to your Railway account and click 'Create New Project' on the main dashboard page. Select 'Provision MySQL' to create your MySQL container.

Railway Provision MySQL gif

Adding MySQL to an Existing Railway Project

You can also add a MySQL container to an existing Railway project. On your project’s main page, click 'Add Plugin' and select 'Add MySQL Plugin'

Railway add Plugin

Connecting to your Railway MySQL Database

Select ‘MySQL’ from the left sidebar under ‘Environment,’ and navigate to the ‘Connect’ tab. Here, you’ll find all of the information you need to connect.

Railway MySQL connection details

Click ‘show’ to reveal your MySQL password. You can interpret your credentials from the MySQL Client command like this:

mysql -h <host> -u <user> -p <password> --port <port> --protocol=TCP <database>

or from the connection URL like this:


Then, enter these credentials into your SQL client to connect:

Arctype Railway MySQL connection credentials

Get help on databases and SQL. Join our Discord community.