导入mysql数据库时出错 [英] Error import mysql database

查看:155
本文介绍了导入mysql数据库时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我导出我的数据库并使用phpmyadmin导出到另一台计算机

i export my database and export to another computer use phpmyadmin

但是出错,

静态分析:

2个错误.

意外字符. (在位置53处的:"附近) 无法识别的语句类型. (在位置1的"div"附近) SQL查询:

Unexpected character. (near ":" at position 53) Unrecognized statement type. (near "div" at position 1) SQL query:

<div class="error"><h1>Error</h1><p><strong>SQL query:</strong> <a href="db_sql.php?sql_query=SET+time_zone+%3D+%22%2B00%3A00%22&amp;show_query=1&amp;db=project1&amp;token=9e474724fcd1b27aa482f098f19b22f1"><span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" />&nbsp

MySQL表示:文档#1064-您的SQL语法有错误;检查与您的MariaDB服务器版本相对应的手册以获取正确的语法,以在第1行的<div class="error"><h1>Error</h1><p><strong>SQL query:</strong> <a href="db_sql.附近使用

MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near <div class="error"><h1>Error</h1><p><strong>SQL query:</strong> <a href="db_sql. at line 1

推荐答案

您的导出文件显然包含HTML代码,而不包含SQL代码.确保正确导出数据库.您可以按照以下步骤在phpMyAdmin中导出数据库.

Your export file clearly contains HTML code and not SQL code. Make sure you export your database properly. You can export your database in phpMyAdmin as follows.

  1. 登录phpMyAdmin
  2. 在左侧菜单中单击您正在使用的数据库
  3. 点击顶部菜单中的导出
  4. 在导出"标题下,确保选择了所有表并选择了SQL选项.
  5. 确保已选中另存为文件"选项(朝页面底部).
  6. 点击开始
  7. 系统将提示您打开或保存文件.请选择保存文件的选项.
  1. Log into phpMyAdmin
  2. Click the database you are working with in the left menu
  3. Click Export in the top menu
  4. Under the Export heading, ensure that all of your tables are selected and that the SQL option is selected.
  5. Ensure the Save as file option (towards bottom of page) is checked.
  6. Click Go
  7. You will be prompted to either open or save the file. Please select the option to save the file.

-引自 http://www.inmotionhosting. com/support/website/phpmyadmin/export-database-using-phpmyadmin

这篇关于导入mysql数据库时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆