简体   繁体   English

Phpmyadmin Mysql Web客户端和终端客户端的区别

[英]Difference In Phpmyadmin Mysql web client and Terminal client

I got problem (#2006 Mysql server gone away) with mysql while connecting and performing some operations through web browser. 在通过网络浏览器连接并执行某些操作时,我遇到了mysql问题(#2006 Mysql server消失了)

Operation Listed below: 操作如下:

  1. When Executing big procedure 执行大程序时
  2. Importing database dump 导入数据库转储
  3. When Access some particular tables It immediately throws "Server gone away". 当访问某些特定表时,它立即抛出“服务器消失”。

Refer this question for Scenarios: Record Not Inserted - #2006 Mysql server gone away 有关场景,请参考此问题: 未插入记录-#2006 Mysql server走了

Note : The above operations are works fine when I perform through terminal. 注意:通过终端执行上述操作时,效果很好。

I tried some configuration as googing stated. 我按照谷歌搜索尝试了一些配置。 That is set wait_timeout, max_allowed_packet. 设置为wait_timeout,max_allowed_pa​​cket。 I checked for the bin_log but it is not available. 我检查了bin_log,但它不可用。 But the issues will not rectified. 但是问题不会得到纠正。

  1. What is the problem & How can I figure out & fix the issue? 有什么问题?如何解决并解决问题?

  2. what is the different between access phpmyadmin mysql server from web browser and terminal? 从网络浏览器和终端访问phpmyadmin mysql服务器有什么区别?

  3. Where I can find the mysql server log file? 在哪里可以找到mysql服务器日志文件?

Note: If you know about any one of the above questions. 注意:如果您知道以上任何一个问题。 Please post here. 请在这里发布。 It would be helpful to trace. 进行跟踪将很有帮助。

Please help me to figure this out.. 请帮我解决这个问题。

Thanks in advance... 提前致谢...

  1. Basically nothing except phpMyAdmin is limited by PHP's timeout and resource limits (limits to keep a runaway script from bogging down your entire machine for all eternity; see the docs for details of those values. In some cases, you might be authenticating through a different user account (for instance, root@localhost and root@127.0.0.1 aren't the same user), but as long as you're using a user with the same permissions the differences are minimal. 基本上,除了phpMyAdmin之外,其他任何内容都不受PHP的超时和资源限制的限制(限制是防止失控的脚本永远陷入整个机器;有关这些值的详细信息,请参阅文档 。在某些情况下,您可能正在通过其他用户进行身份验证帐户(例如,root @ localhost和root@127.0.0.1不是同一用户),但是只要您使用的是具有相同权限的用户,差异就很小。

  2. You can read more about logs in the MySQL manual , note that "By default, no logs are enabled (except the error log on Windows)". 您可以在MySQL手册中阅读有关日志的更多信息,请注意:“默认情况下,未启用任何日志(Windows上的错误日志除外)”。

Below are answer for question 以下是问题的答案

  1. From my research the problem is that browser have some limit to disconnect the connection ie timeout connection. 根据我的研究,问题在于浏览器在断开连接(即超时连接)方面有一定的限制。 So that the above problem raised. 这样就产生了上述问题。

    To resolve this problem 解决这个问题

    1. Go to /opt/lampp/phpmyadmin and open config.inc.php 转到/ opt / lampp / phpmyadmin并打开config.inc.php
    2. add the command $cfg['ExecTimeLimit'] = 0; 添加命令$ cfg ['ExecTimeLimit'] = 0;
    3. Restart the xamp server. 重新启动xamp服务器。 Now you can perform any operations. 现在您可以执行任何操作。

` 2. Web client is differ from terminal because Terminal client will not getting timeout. `2. Web客户端不同于终端,因为终端客户端不会超时。 Terminal client maintain the connection till the progress completed. 终端客户端保持连接,直到进度完成。 I recommenced to use command prompt to import/export/run process by safe way. 我建议使用命令提示符以安全的方式导入/导出/运行进程。

  1. Basically phpmyadmin will not have any log file. 基本上phpmyadmin将没有任何日志文件。 If you wanna see warnings and error you should configure the log file. 如果您想看到警告和错误,则应该配置日志文件。

    Configuration steps: 配置步骤:

    1. Go to /opt/lampp/etc/my.cnf 转到/opt/lampp/etc/my.cnf
    2. Add log_bin = /opt/lampp/var/mysql/filename.log 添加log_bin = /opt/lampp/var/mysql/filename.log
    3. Restart the xamp server. 重新启动xamp服务器。 You can get the log information. 您可以获取日志信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM