You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing training@inductiveautomation.com.
Version:
LESSON LIST
-
6:39Connecting to MySQL
-
6:33Connecting to Microsoft SQL Server Express
-
5:11Creating a SQLite Connection
Take Topic Challenge
Supplemental Videos
LESSON
Connecting to PostgreSQL
Description
Learn how to connect Ignition to a PostreSQL database.
Video recorded using: Ignition 8.1
Transcript
(open in window)[00:00] In this lesson, we'll connect Ignition to a PostgreSQL Database. In the previous lesson, we installed PostgreSQL, and we created this Ignition, with a capital I, database, using pgAdmin. Now we're ready to connect our gateway to this Ignition database. I'm going to, in my browser, head over to My Gateway's Web interface. I'll switch over to the Config section. Let's go ahead and sign in here. We'll want to head over to databases and connections. From here, I'll click on the Create new Database Connection link. We will select the PostgreSQL driver. I'll click Next. Let's give this connection a name here. Since I'm very creative, we'll just call it PostgreSQL.
[01:04] For the description, we'll just type in a quick note. We need to play around with this Connect URL down here. We just need to tell this configuration where the database is located. In my case, the database is actually installed on the same server as my Ignition gateway. Local host is technically fine here, but obviously we would replace that parameter with either another host name or IP address. I did use the default port for PostgreS during the installation, so I don't need to change that. We do have this little database parameter at the end here. This needs to match the database we created in the last video. As I pointed out, it was Ignition with capital I. We'll scroll on down here. We need to type in a username and password. For here, I'm going to use the PostgreS user that was first created when we installed PostgreS. In a production environment, I would not recommend you do this. You'd want to instead head back to PostgreS or pgAdmin, create an Ignition user, and give them the capability to create tables and write queries within the Ignition database.
[02:10] However, this is just for testing. This is just to get you up and running. For more information on creating users, you can check out the PostgreS documentation. Once you have the credentials typed in, we can scroll on down. I'll click the Create New Database Connection button. It looks like we have a valid status. Now we're connected, and we can start using this database connection.