MySQL has been around for a long time and was originally developed as Open Source and by a not-for-profit company. However the MySQL company was acquired by Sun in 2008, who were themselves bought by Oracle in 2010, thus MySQL is now an Oracle product. It remains Open Source, however there are paid for/licensed versions.

Being Open Source and commercially owned does not suit everyone so there are a couple of forks, the most popular of which is Open Source Database, Enterprise Database | MariaDB


MySQL - MySQL :: MySQL Documentation
MariaDB - SQL Structure and Commands - MariaDB Knowledge Base

My SQL Workbench

You can download this from MySQL :: Download MySQL Workbench and it is under a GPL license.
You may see issues if you use this with MariaDB, it will warn about versions but based on my limited experience I believe it works just fine.

Tools and Utilities

Sometimes you need some extra help with MySQL and this is where Percona Toolkit (MySQL Tools & Management Software to Perform System Tasks by Percona) can help.

The mysql standard utility can be used to connect to non-local servers as follows:
mysql --host=server_name
mysql -h server_name
You can see that "-h " is an abbreviation of "--host=", where the latter is the standard variable form. Very often the above will be combined with a username and password. However note that the password will be visible on the command line and also visible in a process list for command history file, so doing this is not a good idea, so leave it off and specify it when prompted. These more complete examples are as follows:
mysql --user=the_username --password=the_password --host=server_name
mysql -u the_username -p -h server_name
Note that "--password" means prompt for the password, like "-p", however "--password=" means send a blank password.

The utility is documented at MySQL :: MySQL 5.7 Reference Manual :: 4.5.1 mysql — The MySQL Command-Line Tool and this will link to an explanation of all the options, however the useful ones are as follows:

  • --user=user_name or -u user_name
  • --password=the_password or -p the_password or -p on its own to be prompted for the password
  • --host=host_name or -h host_name
  • --protocol=tcp other options include socket, pipe, memory
  • --port=3306 -P 3306
  • --database=my_db -D my_db it is worth noting that on the command line you can just add the database name on its own to the end
  • --socket=/cloudsqlproxy/instance-details or -S /cloudsqlproxy/instance-details - this will connect to a Unix socket but can also work with a Windows pip
Typically you would either use --host on its own or --host and --port if necessary, alternatively you would use --socket but not host and socket together.