Connecting to MariaDB


In this lesson we'll connect Ignition to an existing MariaDB installation.

Video recorded using: Ignition 8.1


(open in window)

[00:00] In this lesson, we'll connect Ignition to MariaDB database. So we'll start on our gateway here. Under the config section, under data bases and connections. So I do have an existing database connection. That is a SQLLite type but I do want to create a MariaDB connection. Now I already installed a MariaDB. You can check out the installing MariaDB video for more information there. But once it's installed, we can connect Ignition to it. So I'll start by clicking the create new database connection link here. I will select the MariaDB driver and I'll click next. Let's give this connection to name here. So how about just MariaDB. We can type a description if we want. And we need to specify in the connect URL where this database is located. As I mentioned earlier, I do have an instance of MariaDB running locally. In this case on the same system that my gateway is installed. So I can leave the IP address here, or the host part of the name here, with the local host.

[01:06] For the port, I did change the port on MariaDB. I did use port 3307 because I'm already using 3306 for something else. So I will change the port here. But if you're using the default port for Maria DB, you don't need to change that. And then you do need to specify the name of the database. So you can create within MariaDB different databases. In the installation video, I created a new database called the test. So you'll want to just change the name or the word test here to match whatever the name of the database you're trying to connect to is. So I don't have to actually change this. Next we can type in a username and password to connect. Now it's usually a good idea within the database to create a specific Ignition user. So that way all of the user management and permissions can be handled from the database side of things. However, if you're just testing and trying things out, we can use the root user. So I'll just use the root user. Not something we generally recommend you do in production, but for testing and learning and developing, it's fine.

[02:05] And then I'll type in my password for my root user. Now we can scroll on down this page here and create the new database connection. Oh and of course, make sure you're actually typing the same password over and over again. Try that again. Scroll on down. There we go. And it looks like we have a valid connection. So now elsewhere in Ignition, when we start doing things like trying to record data or query data out of a database, we can use this MariaDB database connection.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.