Connecting Easy PHP to MySQL Workbench
Want to manage files to your PHP hosted site through MySQL Workbench? Say no more! Porkbun does things a bit differently with our SFTP connection settings, where we don't use a password for SSH but an SSH key instead.
Let’s get started!
- 1
- Log in. You should arrive at the Domain Management screen. If you're already logged in, click on ACCOUNT in the top-right corner and select Domain Management.
- 2
-
In the block of icons next to your domain, click the leftmost icon for your Easy PHP. This should bring you to the Easy PHP page.
If you don't see that icon and haven't set up your Easy PHP hosting yet, you can use this guide to set it up.
- 3
- On the Easy PHP hosting page, locate the SSH/SFTP section. Click "Request SSH access", then select the "generate keys" button under the User, Password, and Port for your Easy PHP hosting.
-
-
A pop-up will appear asking if you want to generate a public and private key. Select the blue "OK" button to continue.
Then, click the "Enable SSH" button beside Generate Keys to allow access from MySQL
- 4
- On the PRIVATE KEY DOWNLOAD pop-up screen, select the green "download private key" We will not show this message again, so be sure and download your private key to your local desktop. It will show as a ".pem" file.
-
Once you have done that, select the "Close" button.
- 5
- Next, you'll want to open up MySQL Workbench. Select the plus icon next to "My SQL Connection"
- 6
-
Once that is done, you'll be taken to a new window to configure the connection. You will want to name the new connection something easy to remember, like SSH or your domain name. You are going to want to configure the Connection Method, SSH Hostname, and Username, like the following:
- Connection Method: Standard TCP/IP over SSH
- Host: sftp.your domain name:9022
- User: your domain name
A password will not need to be stored, as we use the Key File instead
In MySQL Workbench, it should look something like this, only with your domain information: - 7
- Remember that Private Key you downloaded earlier? You're going to want to upload that to your configurations. In MySQL Workbench, you can browse your local desktop to find the file and upload the .pem file directly.
- 8
-
Once that has been uploaded, we can move on to the My SQL connection settings.
- Host: pixie-db.your domain name
- Server Port: 3306
- Username: Copy from PHP landing page
In MySQL Workbench, it should look something like this, only with your domain information: For the "Password" field, navigate back to the Easy PHP landing page in Porkbun and locate the MySQL Database section. Click on "Change" next to User, and Password
-
- A pop-up will appear asking if you want to generate a new password. Select the blue "OK" button to continue. Copy the password that appears on the next page of the pop-up.
- 9
- Navigate back to MySQL Workbench and select the "Store in Vault" (May say Store in keychain if on a Mac) option next to Password in the MySQL section
- Then, paste in the password that was copied from the pop-up earlier and select "OK".
Select "OK" from the bottom right of the configuration window once all of the credentials have been entered, and you're all set! You can now manage your site files in MySQL Database to create an excellent site that is sure to blow people's minds.