mysql workbench ssh custo command - mysql

I'm trying to configure a new connection through SSH tunnel.
But on the server, the command mysql does not exists. I have my own compilation called custo-mysql.
I mean, when I'm on the server, I use the following command :
$ custo-mysql -u root -pmypassword
How can I tell workbench to use custo-mysql and not mysql ?

mysql (and your custo-mysql) is a client for the server. Workbench is a client as well, so it doesn't need to use that custo-mysql thing. It just connects to your server.
Basically, on your server you have a "mysqld" running: a mysql server. Your commans custo-mysql connects to that server as a sort of interface. Workbench has the exact same function, so it should work if your networking/tunneling etc is correct.

As #Nanne already mentioned, you don't need the mysql client to connect to your MySQL server using Workbench.
I would just like to point out that Workbench does use the mysql command line client for importing databases in the Admin / Data Import/Restore section. Having said that, you'll certainly be OK without it for everything else.
Cheers,

Related

How to Export MySQL Database From Digital Ocean Managed Database

I have a MySQL database hosted on Digital Ocean Managed Database service. I lost my previous dev machine and did not push the Schema to git along with application files. I am desperate to get back the SQL Schema in my local machine for further Development but have so far been usuccessfull. I have tried so many commands from different suggestions but they all failed.
I connect to the DB via the MySQL Shell using the command:
mysql -u username -password-h example-test-do-user-7878789-0.b.db.ondigitalocean.com -P 25060 -D example_db
All queries are executed successfully via this shell method. When trying to Dump the Schema to my machine, I use the following command:
mysql -u username -p -h mysql-test-do-user-4915853-0.db.ondigitalocean.com -P 25060 your_database_name \> database_file_name.sql
But I get the error as follows: mysqldump: unknown variable 'set-gtid-purged=OFF'
if I remove that part and try again, I get the error:
mysqldump: Got error: 2003: "Can't connect to MySQL server on 'localhost' (10061 "Unknown error")" when trying to connect
which doesnt make sense to me. So, without further ranting; How to I achieve my intended result.
NOTE: I did try Mysql workbench, but it won't connect all together
I can appreciate trying to achieve what you want via mysql shell. I stumbled across the same problem and for quite some tie did not find the help i needed, then I tried doing it using mysql workbench. Try it and you will find that its easier than usin the command-line approach. MySQL Workbench has a good GUI based database miguration capability. You can migrate you Do Managed DB directly into you local mysql server or export a schema dump. If you decide to go wit this approach, just make sure you add your machine's IP as a trusted source, else you will not be able to connect.

Configuring MySQL's mysqlsh to accept SQL and connect by default

How do I configure the MySQL 8.0.15 shell. I just downloaded it and I am already having problems.
When I run the shell program I always have to switch from MySQL JS to MySQL SQL
I always have to reconnect using \connect root#localhost
I would like to open the MySQL shell and just get to work without having to do those two things.
If you start the shell with mysqlsh --sql --uri=myname#localhost it will accept SQL commands directly.
If you need only to use SQL you may wish to consider using the ancient and honorable mysql command line client program. mysql -h localhost -u myname

synch mysql command line monitor on mac(10.8)

I have downloaded mysql workbench on my mac to have a gui for my mysql installation.
I have set the connection to '127.0.0.1(localhost):3306' succesfully
I have created a new database with some table, all works well.
Now when i start mysql command line monitor from a terminal session:
/usr/local/mysql/bin/mysql
And ask for a 'show databases', i cant see the newly created database.
So i did: 1)a mysqladmin reload:nothing, 2)reboot the system: nothing.
How can i synch mysql command line monitor to see the new db?
When i check the 'server status'option on workbench all seems fine, i mean i see its pointing to localhost:3306 and all directories listed there are perfectly matching my local installation, i checked this because at one point i thought that i had 2 mysql installations.
/usr/local/mysql/bin/mysql -u<the same user as in workbench> -p
then authenticate with the same password you use in workbench.

Where can I run a mysql command line under Azure to fix "The used command is not allowed with this MySQL version (1148)"

I have a MySQL database which is hosted in Azure, and I have MySQL Workbench installed on my laptop. I want to do some importing from a CSV file located in my laptop, but whenever I try to that, I get an error message saying:
The used command is not allowed with this MySQL version
I did some online searching, and I found out that I need to run the following command:
mysql -u myuser -p --local-infile somedatabase
But, I don't know where I have to run it, and how, while as I said my database is hosted in Azure.
mysql is just the commandline executable of the MySql client. And most probably it is even part of the MySql workbech - just check the MySQL Workbech working folder. But the result will not be different is my guess.
The best way you can manage Import/Export for MySQL is to use a Free Tier WebSite and Install the phpMyAdmin extension.

skip-secure-auth option not working with mysqldump

I am trying to export a mysql schema from remote server to local but geting the following error:
C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump --skip-secure-auth -h x.y.z.d -uatulya -p'root' t_tcadmin |mysql -u root -proot t_tcadmin
mysqldump: unknown option '--skip-secure-auth'
Warning: Using a password on the command line interface can be insecure.
Without the --skip-secure-auth it connects but I get error 2049.
So I want to use this option to skip secure auth but it is giving the above error. Could anyone suggest.
Thanks..
If you are in a pinch, dealing with an older server where updating the passwords to the newer method is not an option (say, MySQL Server v5.0.95) and attempting to migrate the data to a newer system - without modifying the fragile older system, you may need to temporarily downgrade your local mysql client to 5.5 for myasqldump to be able to talk to the older server. As of 5.6 it is possible to use the MySQL client to connect to it - using --skip-secure-auth in the command, but mysqldump will not accept that flag. And, in MySQL 5.7+ it is impossible to connect to a server that uses the older password storage method at all.