Accessing MariaDB from my Mac Endpoint

Desired Outcome:

Access MariaDB Database (hosted on IONOS), via SSH, using Command Line, from my Mac Endpoint.

In the past I had written a post about this, which is good as it reminded me of some details regarding saving profiles.

Software application to make connection
-The included terminal application within MacOS should suffice
-I’m using iTerm2, currently have version 3.1.5, and the latest is 3.4.15, which is still good for my relatively older MacOS of Mojave (10.14.6). For now, I’ll stick to my current version.

Find the SSH information
-In my case, my ISP package includes an SSH username, but suggestion is to confirm true before buying a new ISP account.
-Always takes me a while to find this, but within IONOS, Hosting, SFTP & SSH, is a section which tells me my Server name (homexxxxxxxxxx.1and1-data.host) and Main User (uxxxxxxxx). I use this info for making connections via FileZilla (FTP port 22 uploads and downloads) and also for SSH access. Now that I know this, I’ll add it to my systems awareness for working within iTerm2.

Making an SSH Connection within iTerm2
-Run the iTerm2 application
-Note: I need the following: servername; SSH username and SSH password
-ssh homexxxxxxxxxx.1and1-data.host -l uxxxxxxx
-Enter the password for SSH

NOTE: I’m still working on this, but I need to include the “-l” before the username, to make it work.
-Now I have an SSH connection between iTerm2 and IONOS

Connecting in to the MariaDB, hosted by IONOS
-I used this post from IONOS to give me an idea of what’s needed
-I have Web Hosting, so it’s – mysql -u dbo123456789 -h db123456789.db.1and1.com -p db123456789
-Note: That looks like mysql with the database username and the servername and the database name
-It will then prompt for the password, which is the database password (not the SSH password)
-It responded with – MariaDB [dbsxxxxxxx]>
-Note: I confirmed that the database name is correct – I’m using x’s here.
-Now I have accessed the command line of the MariaDB database

About Paul

CERT Coordinator, Ham Radio Operator, GTD Fan; Photographer; Domino/Notes Administrator
This entry was posted in Databases, MariaDB. Bookmark the permalink.