meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
applications:connect:macsql [2023/01/12 23:55] – created joetulenkoapplications:connect:macsql [2023/02/13 21:34] (current) gregbalco
Line 1: Line 1:
 ==== Mac (or Linux) ==== ==== Mac (or Linux) ====
  
-The first thing is a MySQL client. I am using Sequel Pro ([[http://www.sequelpro.com]]) on my Mac. I suggest starting with this one. For Linux systems, I am not sure what to use...this may require some research+The first thing is a MySQL client. The free version of TablePlus ([[https://tableplus.com/]]) works fine on Mac and Linux. I suggest starting with this one. For Linux systems, there are a few other options but TablePlus works well for our purposes.
  
-**Note:** in the fairly near future it will probably be necessary to upgrade the database server from MySQL 5.7 to 8.something. Sequel Pro does not work with MySQL 8. Possible replacements are MySQL Workbench or the free version of TablePlus (http://tableplus.com). Alsothere are lots of (hopefully better) options that are not free+**Note:** Previous users who used the Sequel Pro MySQL client will no longer be able to connect to the latest version of ICE-D because we have updated the database to the latest version of SQLwhich is unfortunately not supported on Sequel Pro.
  
 If you have a Mac or Linux machine, SSH is already installed (Mac) or most likely already installed (Linux), so you just have to generate the key pair. If you have a Mac or Linux machine, SSH is already installed (Mac) or most likely already installed (Linux), so you just have to generate the key pair.
Line 11: Line 11:
 ''ssh-keygen'' ''ssh-keygen''
  
-Hit return to accept the default file location. Then hit return again to store it without a passphrase (usually the only reason you would need a passphrase would be if you were using a shared computer). It will spit back some gibberish indicating that the key has been generated. +Hit return to accept the default file location. Then hit return again to store it without a passphrase (typically the only reason you would need a passphrase would be if you were using a shared computer). It will spit back some gibberish indicating that the key has been generated. 
  
 Now type the following: Now type the following:
Line 17: Line 17:
 ''cat  ~/.ssh/id_rsa.pub'' ''cat  ~/.ssh/id_rsa.pub''
  
-This will spit back a long code string with 'ssh-rsa' at the beginning and the name of your computer at the end. Copy the entire string, paste it into an email, and send it to Greg. +This will spit back a long code string with 'ssh-rsa' at the beginning and the name of your computer at the end. Copy the entire string, paste it into an email, and send it to Greg or Joe
  
-Now that we've dealt with SSH keys, open Sequel Pro to connect to the database. A window with connection details will open. Click the "+" icon at lower left to create a new named connection. Give it a sensible name (e.g., ICED_remote). Select the 'SSH' tab. The connection details should look like the following:+Once Greg or Joe has installed your SSH key, open TablePlus (or whatever client -- all MySQL clients should behave fairly similarly) to connect to the database. When you are given the opportunity to do so, 'create a new connection.Give it a sensible name (e.g., 'ICED remote via SSH' or something). The connection details should look like the following:
  
-{{:pluginto:sequel1.png?400|}}+{{:applications:connect:screen_shot_2023-02-13_at_1.27.19_pm.png?600|}}
  
-You will need to ask an administrator (= Greg) for (i) the correct IP address to enter in the 'MySQL Host" field and (ii) the correct host name for the "SSH Host" field. The "Username" and "Password" fields are for your login on the ICE-D MySQL serverAgaintalk to an administrator about getting this set up if you haven't already. The Databases field can be left empty.  The "SSH User" field pertains to your username on the SSH gateway machine, which is "iced."  Leave "SSH password" blank -- no SSH password is required because a key pair has been installed on your machine and the gateway server. Hit 'Save changes' to save the connection parameters for future use+If you don't see the lower half of the window, click 'over SSHto get the fields related to the SSH connectionBasically, you need to enter info associated with the MySQL connection (the upper half of the window) and info associated with the SSH connection (lower half)
  
-Now try either 'Connect' or 'Test connection' to see if it works. +Starting with the upper half (MySQL), you will need to enter something in 'Host', 'Port', 'User' and 'Password.' The port should be 3306, the default value. You will need to get the 'Host' IP address from an administrator (Joe or Greg). You will be using the username 'reader,' and will get the password from an administrator.  
 + 
 +For the lower half, you will need to enter something for 'Server', 'Port', and 'User.' The port is 22, the default. The SSH user is 'iced.' You can get the SSH server name from an administrator. Because you have exchanged SSH keys with the server, you will not need to enter an SSH password, but you will need to make sure the 'Use SSH key' box is checked.  
 + 
 +Click 'save' to save all the connection parameters for future use. Now try either 'Connect' or 'Test' to see if it works. If you 'connect' in TablePlus, a window will come up instructing you to 'press command-K to select a database.' If that, or the equivalent thing in a different client, allows you to select a database called 'iced,' you're done. If this doesn't work, send Greg or Joe the specific error message you received