SQL syntax debug: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 9: | Line 9: | ||
* Enable the MySQL server log. Details on [[Testing#Database_server]] | * Enable the MySQL server log. Details on [[Testing#Database_server]] | ||
* Disable unnecessary database operation permission | * Disable unnecessary database operation permission | ||
* | * Beautify the sql syntax e.g. | ||
** Using the text editor [http://www.sublimetext.com/ Sublime], and enable the Menu option: {{ kbd | key = View > Syntax >SQL }}. The syntax will become colorful for easy to read! | |||
** [http://www.dpriver.com/pp/sqlformat.htm Instant SQL Formatter] | |||
MySQL server configuration | MySQL server configuration | ||
Revision as of 11:30, 27 October 2016
How to debug MySQL query syntax
Goal:
- Reduce the complexity
Steps:
- Reduce the complexity of SQL syntax ex: reduce the WHERE condition
- Examine the sub query part only
- Enable the MySQL server log. Details on Testing#Database_server
- Disable unnecessary database operation permission
- Beautify the sql syntax e.g.
- Using the text editor Sublime, and enable the Menu option: View > Syntax >SQL. The syntax will become colorful for easy to read!
- Instant SQL Formatter
MySQL server configuration