<p>"Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the Database Engine or Analysis Services."</p>

<p>I find using SQL Server Profiler extremely useful during development, testing and when I am debugging database application problems. Does anybody know if there is an equivalent program for MySql?</p>

[{'answer_id': 20289, 'author': 'mercutio', 'author_id': 1951, 'author_profile': 'https://Stackoverflow.com/users/1951', 'pm_score': 0, 'selected': False, 'text': "<p>I don't know about any profiling apps as such, but it's commonplace to use the EXPLAIN syntax for analysing queries. You can use these to figure out the best indexes to create, or you can try changing the overall query and see how it changes the efficiency, etc.</p>\n"}, {'answer_id': 20438, 'author': 'Buggabill', 'author_id': 2106, 'author_profile': 'https://Stackoverflow.com/users/2106', 'pm_score': 6, 'selected': True, 'text': '<p>Something cool that is in version 5.0.37 of the community server is <a href="http://web.archive.org/web/20110609054749/http://dev.mysql.com/tech-resources/articles/using-new-query-profiler.html" rel="noreferrer">MySQL\'s new profiler</a>.  </p>\n\n<p>This may give you what info you are looking for.</p>\n'}, {'answer_id': 20951, 'author': 'Dave Marshall', 'author_id': 1248, 'author_profile': 'https://Stackoverflow.com/users/1248', 'pm_score': 2, 'selected': False, 'text': '<p>If version 5.0.37 isn\'t available, you might want to look at <a href="http://jeremy.zawodny.com/mysql/mytop/" rel="nofollow noreferrer">mytop</a>. It simply outputs the current status of the server, but allows you to run EXPLAIN as (mentioned by mercutio) on particular queries.</p>\n'}, {'answer_id': 82757, 'author': 'Jon Topper', 'author_id': 6945, 'author_profile': 'https://Stackoverflow.com/users/6945', 'pm_score': 4, 'selected': False, 'text': "<p>Are you wanting to monitor performance, or just see which queries are executing?  If the latter, you can configure MySQL to log all queries it's given.  On a RedHat Linux box, you might add</p>\n\n<p><code>log = /var/lib/mysql/query.log</code></p>\n\n<p>to the [mysqld] section of <code>/etc/my.cnf</code> before restarting MySQL.</p>\n\n<p>Remember that in a busy database scenario, those logs can grow quite large.</p>\n"}, {'answer_id': 2151090, 'author': 'Ivan', 'author_id': 260524, 'author_profile': 'https://Stackoverflow.com/users/260524', 'pm_score': 2, 'selected': False, 'text': "<p>Jet Profiler is good if it's a paid version. The LogMonitor just point it to the mysql log file.</p>\n"}, {'answer_id': 4399699, 'author': 'Devid G', 'author_id': 454841, 'author_profile': 'https://Stackoverflow.com/users/454841', 'pm_score': 3, 'selected': False, 'text': '<p>Try JET profiler is a real-time query performance and diagnostics tool!\nI use it in my work. Excellent software and support.\n<a href="http://mysql-tools.com/en/overview-mysql-tools/73-other/91-review-jet-profiler-for-mysql.html">Review Jet Profiler for MySQL</a></p>\n'}, {'answer_id': 14636239, 'author': 'Matija', 'author_id': 779965, 'author_profile': 'https://Stackoverflow.com/users/779965', 'pm_score': 3, 'selected': False, 'text': "<p>In my opinion I've found everything here in raw....</p>\n\n<p>Find and open your MySQL configuration file, usually /etc/mysql/my.cnf on Ubuntu. Look for the section that says “Logging and Replication”</p>\n\n<pre><code># * Logging and Replication\n# Both location gets rotated by the cronjob.\n# Be aware that this log type is a performance killer.\n\nlog = /var/log/mysql/mysql.log\n</code></pre>\n\n<p>or in newer versions of mysql, comment OUT this lines of codes</p>\n\n<pre><code>general_log_file        = /var/log/mysql/mysql.log\ngeneral_log             = 1\nlog_error                = /var/log/mysql/error.log\n</code></pre>\n\n<p>Just uncomment the “log” variable to turn on logging. Restart MySQL with this command:\n    sudo /etc/init.d/mysql restart</p>\n\n<p>Now we’re ready to start monitoring the queries as they come in. Open up a new terminal and run this command to scroll the log file, adjusting the path if necessary.</p>\n\n<pre><code>tail -f /var/log/mysql/mysql.log\n</code></pre>\n"}, {'answer_id': 44026778, 'author': 'Mauricio Alo', 'author_id': 1902560, 'author_profile': 'https://Stackoverflow.com/users/1902560', 'pm_score': 3, 'selected': False, 'text': '<p>Not sure about graphical user interface but there is a command that has helped me profile stored procedures a lot in MySQL using workbench:</p>\n\n<pre><code>SET profiling = 1;\ncall your_procedure;\nSHOW PROFILES;\nSET profiling = 0;\n</code></pre>\n'}, {'answer_id': 52415467, 'author': 'Victor Grados', 'author_id': 7159050, 'author_profile': 'https://Stackoverflow.com/users/7159050', 'pm_score': 3, 'selected': False, 'text': '<p>Using Neor Profiler SQL, is excellent! and the application is free for all users. <a href="https://www.profilesql.com/download/" rel="nofollow noreferrer">https://www.profilesql.com/download/</a> <a href="https://i.stack.imgur.com/F5lji.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F5lji.png" alt="image of query flow" /></a></p>\n'}]
['https://Stackoverflow.com/questions/20263', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1982/']