Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/55.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么在我的.sql文件末尾有PHP/HTML代码?_Php_Mysql - Fatal编程技术网

为什么在我的.sql文件末尾有PHP/HTML代码?

为什么在我的.sql文件末尾有PHP/HTML代码?,php,mysql,Php,Mysql,我正在尝试将网站从一个主机移动到另一个主机。一切都进行得很顺利,除了在我做的每个数据库转储的末尾都有HTML代码(通过phpmyadmin。该站点将离开GoDaddy。)因此,我无法将.sql文件导入DigitalOcean上的数据库。如果我删除了代码,转储会工作,但站点不会。此外,我没有创建该网站。我只是在移动它 下面是.sql文件末尾的内容: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "

我正在尝试将网站从一个主机移动到另一个主机。一切都进行得很顺利,除了在我做的每个数据库转储的末尾都有HTML代码(通过phpmyadmin。该站点将离开GoDaddy。)因此,我无法将.sql文件导入DigitalOcean上的数据库。如果我删除了代码,转储会工作,但站点不会。此外,我没有创建该网站。我只是在移动它

下面是.sql文件末尾的内容:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
    <link rel="icon" href="./favicon.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
    <title>phpMyAdmin</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="phpmyadmin.css.php?token=a265dc411b059a3932a26eeefe2fc8f0&amp;js_frame=right&amp;nocache=4099247312" />
    <link rel="stylesheet" type="text/css" href="print.css" media="print" />
    <script type="text/javascript">
    try {
        // can't access this if on a different domain
        var topdomain = top.document.domain;
        // double-check just for sure
        if (topdomain != self.document.domain) {
            alert("Redirecting...");
            top.location.replace(self.document.URL.substring(0, self.document.URL.lastIndexOf("/")+1));
        }
    }
    catch(e) {
            alert("Redirecting... (error: " + e);
            top.location.replace(self.document.URL.substring(0, self.document.URL.lastIndexOf("/")+1));
    }

    </script>
        <script type="text/javascript">
    // <![CDATA[
    // Updates the title of the frameset if possible (ns4 does not allow this)
    if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknown'
        && typeof(parent.document.title) == 'string') {
        parent.document.title = '68.178.217.9 / newdbgcf / merchant';
    }

    // ]]>
    </script>

    <script src="./js/tooltip.js" type="text/javascript"></script>
    <meta name="OBGZip" content="true" />
        <!--[if IE 6]>
    <style type="text/css">
    /* <![CDATA[ */
    html {
        overflow-y: scroll;
    }
    /* ]]> */
    </style>
    <![endif]-->
</head>

<body>
<div id="TooltipContainer" onmouseover="holdTooltip();" onmouseout="swapTooltip('default');"></div>
    <div id="serverinfo">
<a href="main.php?token=a265dc411b059a3932a26eeefe2fc8f0" class="item">        <img class="icon" src="./themes/original/img/s_host.png" width="16" height="16" alt="" /> 
Server: 68.178.217.9</a>
        <span class="separator"><img class="icon" src="./themes/original/img/item_ltr.png" width="5" height="9" alt="-" /></span>
<a href="db_structure.php?db=newdbgcf&amp;token=a265dc411b059a3932a26eeefe2fc8f0" class="item">        <img class="icon" src="./themes/original/img/s_db.png" width="16" height="16" alt="" /> 
Database: newdbgcf</a>

<!-- PMA-SQL-ERROR -->
    <div class="error"><h1>Error</h1>
    <p><strong>SQL query:</strong>
<a href="tbl_sql.php?db=newdbgcf&amp;table=merchant&amp;token=a265dc411b059a3932a26eeefe2fc8f0&amp;sql_query=SHOW+TABLE+STATUS+LIKE+%27merchant%27%3B&amp;show_query=1"><img class="icon" src=" ./themes/original/img/b_edit.png" width="16" height="16" alt="Edit" /></a>    </p>
    <p>
        <span class="syntax"><span class="syntax_alpha syntax_alpha_reservedWord">SHOW</span>  <span class="syntax_alpha syntax_alpha_reservedWord">TABLE</span>  <span class="syntax_alpha syntax_alpha_reservedWord">STATUS</span>  <span class="syntax_alpha syntax_alpha_reservedWord">LIKE</span>  <span class="syntax_quote syntax_quote_single">'merchant'</span><span class="syntax_punct syntax_punct_queryend">;</span><br /><br /></span>
    </p>
<p>
    <strong>MySQL said: </strong><a href="http://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html" target="mysql_doc"><img class="icon" src="./themes/original/img/b_help.png" width="11" height="11" alt="Documentation" title="Documentation" /></a>
</p>
<code>
#2006 - MySQL server has gone away
</code><br />
</div><fieldset class="tblFooters">    </fieldset>

<script type="text/javascript">
//<![CDATA[
// updates current settings
if (window.parent.setAll) {
    window.parent.setAll('en-utf-8', 'utf8_unicode_ci', '1', 'newdbgcf', 'merchant', 'a265dc411b059a3932a26eeefe2fc8f0');
}
    // set current db, table and sql query in the querywindow
if (window.parent.reload_querywindow) {
    window.parent.reload_querywindow(
        'newdbgcf',
        'merchant',
        '');
}

if (window.parent.frame_content) {
    // reset content frame name, as querywindow needs to set a unique name
    // before submitting form data, and navigation frame needs the original name
    if (typeof(window.parent.frame_content.name) != 'undefined'
     && window.parent.frame_content.name != 'frame_content') {
        window.parent.frame_content.name = 'frame_content';
    }
    if (typeof(window.parent.frame_content.id) != 'undefined'
     && window.parent.frame_content.id != 'frame_content') {
        window.parent.frame_content.id = 'frame_content';
    }
    //window.parent.frame_content.setAttribute('name', 'frame_content');
    //window.parent.frame_content.setAttribute('id', 'frame_content');
}
//]]>
</script>
</body>
</html>

这是在大量“插入到”命令之后出现的。最后一个与其余的没有什么不同。

导出数据库时可能发生错误。您可以将HTML代码放入文本文件(.HTML)中,然后用浏览器打开它以查看其中包含的内容,也可以只查看代码

您将在代码中找到以下行:

<strong>MySQL said: </strong><a href="http://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html" target="mysql_doc"><img class="icon" src="./themes/original/img/b_help.png" width="11" height="11" alt="Documentation" title="Documentation" /></a>
</p>
<code>
#2006 - MySQL server has gone away
</code>
您现在有了错误消息。谷歌搜索,在stackoverflow上搜索等等

也许这也有帮助:


这是关于导入而不是导出,但应该是相同的问题…

您将MySql错误打印到sql文件中。阅读代码。<代码> < P> <强> MySQL说:< /强>

<代码> 2006 MySQL服务器已经消失你在代码“2006”中看到了吗?MySQL服务器已经离开“HI”国家,如果这个答案已经解决了你的问题,请点击检查标记来考虑。这向更广泛的社区表明,你已经找到了一个解决方案,并给回答者和你自己带来了一些声誉。没有义务这样做。