Active5 years, 2 months ago
I administer a website on a remote, shared host. My web host offers MySQL, and I am able to access this from my Mac OS X computer using a GUI program, Sequel Pro. That works great.
But I want to script some queries, and Sequel Pro is not scriptable. What should I do?
Home > download > search results for download mysql command line client free. Recommended results. BitComet 1.15. (MySQL Manager - a GUI for MySQL admin and Access to MySQL conversion) Download License. Category:mac - DVD & Video. The MySQL installation provides a command-line client program called 'mysql'. (Recall that the server program is called 'mysqld' with a suffix 'd'; the client program does not have the suffix 'd'). (For Mac OS X) Starting MySQL Server and Client-- Start/shutdown the Server.
Any client for MySQL should work equally well for derived products, such as MySQL Enterprise, Percona Server, MariaDB, etc. Free Clients MySQL Workbench (Mac, Windows, Linux), Free, open-source. MySQL APT Repository MySQL provides an APT-style software repository for installing the MySQL server, client. MySQL Cluster CGE (commercial) MySQL Cluster is a real-time, transactional database designed for fast, always-on access to data under high throughput conditions. Plus, it includes everything in MySQL Enterprise Edition. The main command line utilities are mysql, mysqldump, and mysqladmin. Many people like the phpMyAdmin package to manage MySQL through a web browser. MySQL is not part of the default install in OS X.
I've read about tunneling to mysql via SSH. I have shell access to the server, with an SSH key on my Mac, so
ssh [email protected] -p 7978
gets me in. Should tunneling the MySQL port 3306 work? Like this?
ssh [email protected] -L 3306:127.0.0.1:3306
(It 'times out' after a minute.)
Do I need to install mysql on my Mac?
Jerry KrinockJerry Krinock
2 Answers
On the MySQL server, you need to modify the file my.cnf, whose location depends on OS: in Debian, it is in /etc/mysql, for instance. Edit it, find the line
and add to it the following text:
Here, what is important is that you comment out the line skip-networking, and that you insert, in the line bind-address, the IP of the server. Save, restart mysql (again, this depends on OS), access MySQL with the usual
and allow access from your own remote IP to the existing database:
Now go back to your remote system, and test the new functionality:
For this to work, of course, you need a MySQL client on your Mac. You can now script your own MySQL queries, for instance, in a bash script as follows:
EDIT:
This is required if you want to connect remotely directly to the MySQL server. If you just want to script your queries locally (i.e., on the server), then MySQL client will do. You can find an introduction here.
MariusMatutiaeMariusMatutiae40.1k99 gold badges5858 silver badges103103 bronze badges
Mysql Command Line Client For Mac
Using ssh you can run commands remotely. So if you want to script some queries, this is one way to do it. Maybe not what you're looking for, but an option to know about Badlion client for mac.
Let's say host B is your sql server. host A is the client you want to run your queries from
I have read Windows SSTP VPN - connect from Mac but the instructions are too terse for me. I want to connect to a VPN using SSTP and a certificate. I've installed the certificate in Keychain using the instructions for How to Import and Export SSL Certificates in Mac 10.7, although I'm using Mac OS X 10.11.6 the instructions seem fine. I've installed sstp-client but I can't get it to run (see. I've asked a question that links to here: Connect to SSTP VPN using MAC OS X. – RobG Jul 24 '17 at 6:51 Looks like it's only one working way to connect last version mac os to SSTP VPN. Apr 15, 2018 A client implementation of Secure Socket Tunneling Protocol (SSTP) for Linux / Mac OS-X that allows remote access via SSTP VPN to Microsoft Windows 2008 Server. Features Establish a SSTP connection to a remote Windows 2K8 server from Linux / Mac OS X. Ssh client for mac os x.
On host B, put your queries in files, e.g. create a 'test.sql' file. In my case I just put 'show databases'
Then from host A you can do
ssh [options] '[command to run]'
Mysql Command Line Client For Windows
Set up passwordless login with ssh (using ssh-rsa authentication). Anyconnect vpn client software-4.5.03040 for mac os x. Using 'ssh-keygen' and 'ssh-copy-id'. You can test this out by then doing
ssh [options] 'ls' and see if it returns 'ls' results of host B
From there you can do
ssh [options] 'mysql [options] < test.sql'
Does that make sense?
You would also need to put a password on your mysql command which you might not be a fan of, not very secure. I have not experimented with other 'passwordless' login to mysql, maybe there is another way to do that portion.
Mysql Command Line Examples
benben