Oct 20, 2013 LANCE LARSEN
NEXT

Remapping MySQL Workbench “Execute SQL” to F5

As a primarily Microsoft SQL Server developer, when playing around with MySQL database ( specifically using MySQL Workbench ) wanted to be able to press F5 to execute the SQL commands that I was writing, by default you need to…

mysqlAs a primarily Microsoft SQL Server developer, when playing around with MySQL database ( specifically using MySQL Workbench ) wanted to be able to press F5 to execute the SQL commands that I was writing, by default you need to press Control-Enter or Control-Shift-Enter – but there is no GUI interface to remap keys shortcuts like there is in most Microsoft programs… so… found that the following worked and wanted to share!

Locate your “main_menu.xml” MySQL configuration file – mine was in “C:\Program Files (x86)\MySQL\MySQL Workbench CE 6.0.6\data\main_menu.xml”.  Find the following XML.
 

<value type="object" struct-name="app.MenuItem" id="com.mysql.wb.menu.query.execute_current_statementwin"> 
  <link type="object" key="owner" struct-name="app.MenuItem">com.mysql.wb.menu.query</link> 
  <value type="string" key="caption">Execute Current Statement</value> 
  <value type="string" key="name">query.execute_current_statement</value> 
  <value type="string" key="command">builtin:query.execute_current_statement</value> 
  <value type="string" key="itemType">action</value> 
  <value type="string" key="shortcut">Modifier+Return</value>
  <value type="string" key="platform">windows</value>
</value> 

Replace the “shortcut” xml (line 7 above) with the following, exit and reopen MySQL Workbench – and you’re rocking with F5!

<value type="string" key="shortcut">F5</value>

NEXT
[ SYSTEM ] Rejoining the server...
[ WARNING ] Rejoin failed... trying again in seconds.
[ CRITICAL ] Failed to rejoin. Please retry or reload the page.
[ PAUSED ] The session has been paused by the server.
[ CRITICAL ] Failed to resume the session. Please retry or reload the page.

RECONNECTING

NEURAL_LINK_LOST

Stream has been de-synced
or shifted to a restricted sector.
Attempting to re-establish connection...