The Script Editor
provides an alternate
interface for use when dealing with large SQL scripts that involve
multiple SQL statements.
The Script Editor displays within an individual tab in the Result Area. When a Script Editor tab is active, the Advanced Toolbar buttons are replaced with script debugging buttons.
To open a script in the Script Editor, choose the Open Script ... option from the File menu. You can also press the Ctrl + O keys to open an SQL script.
To create a new Script Editor window without loading a script, choose the New Script Tab option from the File menu.
If you're experiencing problems with character sets (for example, Spanish accented characters, Russian, or Chinese characters aren't displayed properly), here's some advice:
Avoid ANSI encoding in your script files. Rather than using ANSI, save scripts in UTF-8 encoding. Take care when loading script files generated by other tools. Many tools save files in ANSI encoding, which in turn means you have to open them as ANSI in Query Browser (see the Files of type combo box in the file open dialog):
There are significant limitations to ANSI formatted files; the current system locale must be the same as the machine where the file originated. For example, you cannot store a script in ANSI on a French version of Windows and expect it to load correctly on a Spanish version of Windows. Because of this and many other limitations we strongly recommend always using Unicode for scripts. It doesn't matter whether you use UTF-8 or UTF-16, since both are Unicode transformation formats and can be read properly by any of the MySQL GUI tools. Using UTF, you could even write Spanish text with Chinese comments on a German version of Windows.
The MySQL Query Browser forum provides many contributions by users of non-Latin1 characters sets; see http://forums.mysql.com/list.php?108.