Colin Robinson

Use MariaDB with PhpStorm

Update August 2018:

PHPStorm now includes MariaDB as a schema type but does not include the driver files. It does offer to download the MariaDB driver for you, but if you want to use the native driver, install mariadb-jdbc from the AUR and edit the MariaDB entry in PHPStorm to use /usr/share/java/mariadb-jdbc/mariadb-java-client.jar as the driver file.

Manually create the driver entry (the old way):

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:

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.

18 Responses to “Use MariaDB with PhpStorm”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.