Using Copy and Paste as a mysql Input Source

Problem

You want to take advantage of your graphical user interface (GUI) to make mysql easier to use.

Solution

Use copy and paste to supply mysql with statements to execute. In this way, you can take advantage of your GUI’s capabilities to augment the terminal interface presented by mysql.

Discussion

Copy and paste is useful in a windowing environment that enables you to run multiple programs at once and transfer information between them. If you have a document containing statements open in a window, you can just copy the statements from there and paste them into the window in which you’re running mysql. This is equivalent to typing the statements yourself, but often quicker. For statements that you issue frequently, keeping them visible in a separate window can be a good way to make sure they’re always at your fingertips.

Get MySQL Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.