Creating a New Database 0:00Let's take a look at how you can manage your databases and database users using Laravel Forge. When you first create a new server with Forge, it will automatically create a database for you called Forge and a database user which is also called Forge. This user is also the root user for the database. The credentials will be sent to you via email and you will see them in a pop-up when you create a new server. So, let's create a new database on our system. You can do this by going to your server and then to the database tab. And here you can see that we can add a new database, add database users or change the existing root password for the existing Forge user. For now, we want to create a new database and call it Forge Demo. The user that we want to create, so this will be the user that only has access to this specific database, will also be called Forge Demo and the password will also be Forge Demo. And press Add Database. Adding SSH Key Access 0:55that we want to create, so this will be the user that only has access to this specific database, will also be called Forge Demo and the password will also be Forge Demo. And press Add Database. Now Forge has created the database on your server and as you can see, if we want to add a new database user, we can now choose between two of the databases. A Forge database that was initially created when we created the server and Forge Demo, the one that we just added. So, the next thing I want to do is I want to be able to access my database using tools like SQL Pro. So, to get started with this, we first need to connect our SSH key and add it to Laravel Forge, because connecting to your server is only available with using SSH keys. So, go to the SSH key part. And here we can see again that Forge tells you that password authentication is disabled because it's just a major security concern and instead you should use your public SSH key forAnd here we can see again that Forge tells you that password authentication is disabled because it's just a major security concern and instead you should use your public SSH key for authentication. So, let's give our key a name so that we can identify it later on. This will be Marcel's MacBook. And next we paste in the public key. So, go to item or your terminal of choice and then we will cat the files content, which is at the root folder in a folder called .ssh id rsa.pub. And we will send the output of the cat command to another command, which is called pbcopy, which just copies everything to the clipboard. All right, now we can just paste our key in here and let Forge add it to the server for us. Now that the SSH key is available at our server, let's try and connect to our newly created database using SQL Pro. So, we will copy the IP address of the server so that we can connect to it, Connecting via SQL Pro 3:09Now that the SSH key is available at our server, let's try and connect to our newly created database using SQL Pro. So, we will copy the IP address of the server so that we can connect to it, open SQL Pro, and add a new connection. We will use SSH. The name is ForgeDemo. The MySQL host, since we are connecting over SSH, will be localhost. The username is ForgeDemo and the password is ForgeDemo and the database is also ForgeDemo. And now to connect to the server in the first place, the host is the IP address, the user is Forge, and instead of using a password, we are going to use our private SSH key. So, the Forge server knows about the public key and we use our private key to authenticate against it. So, if we test our connection, connection succeeded. Alright, great, let's connect. Creating Multi-Database User 4:16and we use our private key to authenticate against it. So, if we test our connection, connection succeeded. Alright, great, let's connect. And we just connected to an empty database with our newly created user. If you do not want to add new databases but only want to add new users or change the existing settings of one of your existing users, you can do this too. So, instead, we can also create a new user that we call ForgeNewUser with also ForgeNewUser as the password. And we want this user to be able to access both of the databases that we just created and press Add User. Okay, now the new user is created on our server and we can now use it to authenticate against the database using something like SQL Pro. And now let's add this connection back again, give it a name,the database using something like SQL Pro. And now let's add this connection back again, give it a name, and now let's add this connection back again, give it a name, use the newly created user and password. This time we don't specify a database because the user has access to multiple ones. And the SSA chose Forge as the username and our private key to authenticate. And now, as you can see, I successfully connected and I can choose between both databases to access them. So this is the Forge database, which also has some content, and Forge Demo, which is the new database without any content. So Forge gives you a very easy way on how you can add new databases, restrict access to databases for specific users, and how youwhich is the new database without any content. So Forge gives you a very easy way on how you can add new databases, restrict access to databases for specific users, and how you can add database users at all.