Run mysql commandline client in Windows

from the Artful MySQL Tips List

This assumes version 5.7. If your version differs, substitute it for 5.7 in what follows. 1. If you installed the 64-bit version, it is likely in c:\program files\MySQL\MySQL server 5.7\. If not, search for mysqld.exe in Windows Explorer. When you find it, add the full path to that bin folder to the system path. After you reboot, you can run any MySQL executable without a path reference. 2. Create a desktop or quick launch shortcut to open a command window that invokes:
3. Save to somewhere on the system path, with a short & punchy name like mycli, a batch file that calls the mysql client with:
  mysql -uUSR -pPWD
substituting your values for USR & PWD. Then when you want to run the mysql client, click on the icon for #2 and type in the name from #3.

Last updated 26 Sep 2016

Return to the Artful MySQL Tips page