Colin Robinson

Just another guy on the internet

Use MariaDB with PhpStorm

PhpStorm comes with several preconfigured database drivers (although the drivers themselves must be download separately). This short tutorial will tell you how to setup MariaDB as one of your Drivers on PhpStorm running on Arch Linux.

1. Install mariadb-jdbc from the AUR

2. Open the “Data Sources and Drivers” window

This can be done by selecting the menu option View > Tool Windows > Database and then clicking the wrench icon.


3. Add a new Driver

Click the green plus icon and select “Driver” (it should be the last option). You’ll be presented with a blank form to fill out. This is what it will look like when we’re done:

  • Set the name to “MariabDB”
  • Change the “Dialect” to MySQL.
  • Add the JDBC driver ( /usr/share/java/mariadb-jdbc/mariadb-java-client.jar )
  • After adding the driver library, we can now change the Class to org.mariadb.jdbc.Driver
  • Add a URL connection template:
    jdbc:mariadb://{host::localhost}?[:{port::3306}][/{database}?][\?<&,user={user},password={password},{:identifier}={:identifier}>]

4. (optional) Configure default connection options

You can find a full list of the optional URL parameters on the MariaDB website. I am using the following settings:

5. Add a data source which uses the MariaDB Driver

Just click the green plus icon again, select MariaDB as your data source, and fill out the connection information for your database.

One Response to “Use MariaDB with PhpStorm”

  • John says:

    Colin: A BIG thank you…NO, A HUGE thank you…for taking the time to post this. I recently switched over to MariaDB here on my office machine at the same time as (finally) setting up my phpstorm 10 to develop locally instead of constantly uploading to my public server. Trying to juggle the two of those was sending me in circles as I watched youtube videos, visited help pages and scoured stack overflow for the past two days. Your clearly explained step-by-step got me up and running! The added screen shots were extremely helpful to boot. This blog post was the only online tutorial that helped get me back to work. Once again…THANK YOU for taking the time to post it. John S.

Leave a Reply

Your email address will not be published.