Is it possible to query a mySQL db via Terminal
Normally I use phpMyAdmin via Chrome to UPDATE or INSERT in my online db which is hosted by GoDaddy. But I now want to do some edits & queries while using Terminal with Zsh on a Mac running Sonoma.
If I do an UPDATE or INSERT like below, all is fine and it works. There is no response in Terminal and none is needed.
"UPDATE `club` SET `facilityID` = '123' WHERE `club`.`id` = '789'";
or
"INSERT INTO `danceData`.`club` (id,name) VALUES ('789','John')";
But I now need to query data from the remote database. If I was using phpMyAdmin I would do the following and see my result.
"SELECT facilityID FROM `club` WHERE `club`.`id` LIKE 'HUNTPOUT1'";
But when I use the SELECT in Terminal, there is no response of what the data is in the field 'facilityID'.
What do I need to do to get a return of data to Terminal?
Is it possible to just use Terminal and get a response or is it mandatory that I use a mySQL client?
Subject
Written By
Posted
Is it possible to query a mySQL db via Terminal
December 22, 2023 12:14PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.