Remotely Connecting to a Namecheap Database: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== DataGrip == === Make a new connection === * <kbd>⌘</kbd> + <kbd>;</kbd> to open the '''Data Sources and Drivers''' dialog, then <kbd>⌘</kbd> + <kbd>N</kbd> for a new connection. ** Or Select the '''Plus Sign''' icon at the top left of the app > '''Data Source''' > '''MariaDB'''. ** '''SSH/SSL''' tab *** Check '''Use SSH tunnel''' *** Click the '''three dots''' button to the far right of the '''Use SSH tunnel''' line to create a new tunnel (or select from...") |
|||
| Line 14: | Line 14: | ||
**** '''Authentication type:''' Key pair | **** '''Authentication type:''' Key pair | ||
**** '''Private key file:''' ''(path to a key file downloaded from cPanel)'' | **** '''Private key file:''' ''(path to a key file downloaded from cPanel)'' | ||
***** '''cPanel''' > '''Security''' > '''SSH Access''' > '''Manage SSH keys''' > '''Public keys''' > ''(item named like `id_rsa`)'' > '''View/Download''' | |||
***** Download the file and save it to `~/.ssh/`. Makes sense to rename it to `namecheap_rsa.pub` so as to overwrite any existing `id_rsa` files. | |||
**** Click the '''Test Connection''' button. | |||
***** Ignore the passphrase prompt. | |||
***** A 2nd prompt will appear asking for a password. Enter the ssh account password. | |||
**** The SSH configuration can be saved if the test connection was successful. | |||
** '''General''' tab | |||
*** '''Host:''' 127.0.0.1 (Don't use "localhost" here.) | |||
*** '''Port:''' 3306 | |||
*** '''User:''' MariaDB user name with access to the web app's database | |||
*** '''Password:''' MariaDB password | |||
*** '''Database:''' The web app's MariaDB database name | |||
*** Click the '''Test Connection''' button | |||
**** Ignore the '''passphrase''' prompt. | |||
**** The next dialog will prompt for a '''password'''. Enter the ssh account's password. | |||
*** The data source is ready to be saved if the test connection succeeds. | |||
[https://www.namecheap.com/support/knowledgebase/article.aspx/1249/89/how-to-remotely-connect-to-a-mysql-database-located-on-our-shared-server/ How to remotely connect to a MySQL database located on our shared server] - Namecheap Knowledgebase | [https://www.namecheap.com/support/knowledgebase/article.aspx/1249/89/how-to-remotely-connect-to-a-mysql-database-located-on-our-shared-server/ How to remotely connect to a MySQL database located on our shared server] - Namecheap Knowledgebase | ||
[[Category:Web Development]][[Category:MySQL]][[Category:MariaDB]] | [[Category:Web Development]][[Category:MySQL]][[Category:MariaDB]] | ||
Revision as of 19:10, 15 February 2022
DataGrip
Make a new connection
- ⌘ + ; to open the Data Sources and Drivers dialog, then ⌘ + N for a new connection.
- Or Select the Plus Sign icon at the top left of the app > Data Source > MariaDB.
- SSH/SSL tab
- Check Use SSH tunnel
- Click the three dots button to the far right of the Use SSH tunnel line to create a new tunnel (or select from the drop down if one has already been created for this Namecheap hosting account.)
- Click the plus sign at the top left of the SSH Configurations dialog to add a new configuration.
- Host: IP or default URL for the Namecheap hosting account.
- Port: SSH port assigned to the Namecheap hosting account.
- User name: Admin user name for the Namecheap account, i.e. the account that has ssh access.
- Authentication type: Key pair
- Private key file: (path to a key file downloaded from cPanel)
- cPanel > Security > SSH Access > Manage SSH keys > Public keys > (item named like
id_rsa) > View/Download - Download the file and save it to
~/.ssh/. Makes sense to rename it tonamecheap_rsa.pubso as to overwrite any existingid_rsafiles.
- cPanel > Security > SSH Access > Manage SSH keys > Public keys > (item named like
- Click the Test Connection button.
- Ignore the passphrase prompt.
- A 2nd prompt will appear asking for a password. Enter the ssh account password.
- The SSH configuration can be saved if the test connection was successful.
- General tab
- Host: 127.0.0.1 (Don't use "localhost" here.)
- Port: 3306
- User: MariaDB user name with access to the web app's database
- Password: MariaDB password
- Database: The web app's MariaDB database name
- Click the Test Connection button
- Ignore the passphrase prompt.
- The next dialog will prompt for a password. Enter the ssh account's password.
- The data source is ready to be saved if the test connection succeeds.
How to remotely connect to a MySQL database located on our shared server - Namecheap Knowledgebase