<tfoot id='QrJ74'></tfoot>
    1. <i id='QrJ74'><tr id='QrJ74'><dt id='QrJ74'><q id='QrJ74'><span id='QrJ74'><b id='QrJ74'><form id='QrJ74'><ins id='QrJ74'></ins><ul id='QrJ74'></ul><sub id='QrJ74'></sub></form><legend id='QrJ74'></legend><bdo id='QrJ74'><pre id='QrJ74'><center id='QrJ74'></center></pre></bdo></b><th id='QrJ74'></th></span></q></dt></tr></i><div id='QrJ74'><tfoot id='QrJ74'></tfoot><dl id='QrJ74'><fieldset id='QrJ74'></fieldset></dl></div>
        <bdo id='QrJ74'></bdo><ul id='QrJ74'></ul>

    2. <small id='QrJ74'></small><noframes id='QrJ74'>

      <legend id='QrJ74'><style id='QrJ74'><dir id='QrJ74'><q id='QrJ74'></q></dir></style></legend>

      1. MySQL - 如何跟踪每个查询?

        MySQL - How to track every query?(MySQL - 如何跟踪每个查询?)
          <bdo id='Esq9c'></bdo><ul id='Esq9c'></ul>
        • <tfoot id='Esq9c'></tfoot>

            <legend id='Esq9c'><style id='Esq9c'><dir id='Esq9c'><q id='Esq9c'></q></dir></style></legend>

            <small id='Esq9c'></small><noframes id='Esq9c'>

            <i id='Esq9c'><tr id='Esq9c'><dt id='Esq9c'><q id='Esq9c'><span id='Esq9c'><b id='Esq9c'><form id='Esq9c'><ins id='Esq9c'></ins><ul id='Esq9c'></ul><sub id='Esq9c'></sub></form><legend id='Esq9c'></legend><bdo id='Esq9c'><pre id='Esq9c'><center id='Esq9c'></center></pre></bdo></b><th id='Esq9c'></th></span></q></dt></tr></i><div id='Esq9c'><tfoot id='Esq9c'></tfoot><dl id='Esq9c'><fieldset id='Esq9c'></fieldset></dl></div>
                  <tbody id='Esq9c'></tbody>

                • 本文介绍了MySQL - 如何跟踪每个查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  <块引用>

                  可能重复:
                  如何启用 MySQL 查询日志?

                  有没有办法跟踪 MySQL 中的每个 SQL 查询?

                  我正在使用 Doctrine ORM 构建实体并从数据库中获取它们,并且想看看 Doctrine 产生了哪些查询.那么当我刷新一个使用 Doctrine ORM 从数据库中获取一些数据的网页时,我在哪里可以看到在数据库中执行的查询?

                  这可能吗?

                  解决方案

                  让这个应用程序决定是否要记录查询,如果要记录所有查询,请在 MySQL 端记录查询.

                  Doctrine 在包中有一个内置的记录器接口和一个演示记录器.来自 http://docs.doctrine-project.org/en/2.0.x/reference/configuration.html#sql-logger-optional:

                  setSQLLogger($logger);$config->getSQLLogger();

                  <块引用>

                  获取或设置记录器,用于记录 Doctrine 执行的所有 SQL 语句.记录器类必须实现 DoctrineDBALLoggingSQLLogger 接口.可以在 DoctrineDBALLoggingEchoSQLLogger 中找到使用 echo 和 var_dump 记录到标准输出的简单默认实现.`

                  Possible Duplicate:
                  How to enable MySQL Query Log?

                  Is there a way to track every SQL query in MySQL?

                  Im using Doctrine ORM to build entities and fetch them from database, and would like to see what queries is Doctrine producing. So when I refresh a webpage that uses Doctrine ORM to fetch some data from database, where could I see queries executed in database?

                  Is this possible?

                  解决方案

                  Let this application decide if you want queries logged and log queries on MySQLs side if you want all queries logged.

                  Doctrine has a builtin logger interface and a demo logger in the package. From http://docs.doctrine-project.org/en/2.0.x/reference/configuration.html#sql-logger-optional :

                  <?php
                  $config->setSQLLogger($logger);
                  $config->getSQLLogger();
                  

                  Gets or sets the logger to use for logging all SQL statements executed by Doctrine. The logger class must implement the DoctrineDBALLoggingSQLLogger interface. A simple default implementation that logs to the standard output using echo and var_dump can be found at DoctrineDBALLoggingEchoSQLLogger.`

                  这篇关于MySQL - 如何跟踪每个查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  • <bdo id='xWmRa'></bdo><ul id='xWmRa'></ul>

                      <tfoot id='xWmRa'></tfoot>

                      • <i id='xWmRa'><tr id='xWmRa'><dt id='xWmRa'><q id='xWmRa'><span id='xWmRa'><b id='xWmRa'><form id='xWmRa'><ins id='xWmRa'></ins><ul id='xWmRa'></ul><sub id='xWmRa'></sub></form><legend id='xWmRa'></legend><bdo id='xWmRa'><pre id='xWmRa'><center id='xWmRa'></center></pre></bdo></b><th id='xWmRa'></th></span></q></dt></tr></i><div id='xWmRa'><tfoot id='xWmRa'></tfoot><dl id='xWmRa'><fieldset id='xWmRa'></fieldset></dl></div>
                            <tbody id='xWmRa'></tbody>
                        • <legend id='xWmRa'><style id='xWmRa'><dir id='xWmRa'><q id='xWmRa'></q></dir></style></legend>

                          <small id='xWmRa'></small><noframes id='xWmRa'>