简体   繁体   English

无法使用PHPMyAdmin导入数据库

[英]Can't import a data base using PHPMyAdmin

We have a database on webserver that works there:~ 我们在网络服务器上有一个可以在其中运行的数据库:〜

Apache 2.4.23 阿帕奇2.4.23
PHP 5.5.38 PHP 5.5.38
MySQL 5.5.61cll MySQL 5.5.61cll

Through PHPMyAdmin, I saved a file on my laptop. 通过PHPMyAdmin,我在笔记本电脑上保存了一个文件。
We have a new webserver and I need to 'transfer' the database here: 我们有一个新的网络服务器,我需要在这里“转移”数据库:

Apache 2.4.39 阿帕奇2.4.39
PHP 5.6.36 PHP 5.6.36
MySQL 5.6.43cll-lve MySQL 5.6.43Cll-LVE

Can't import! 无法导入! Can you guide me (step-by-step) on this? 您可以对此进行逐步指导吗? I'm a journalist, not a 'computer man'. 我是记者,而不是“计算机人”。

I export (a month ago) the database that we work on the original website. 我(一个月前)导出了我们在原始网站上工作的数据库。 It has a lot of articles that we don't want to lose. 它有很多我们不想丢失的文章。 I tried to import on the new website to work with it and improve it. 我尝试在新网站上导入以使用它并进行改进。 I've received the message that follow: 我收到了以下消息:

Error 错误

Static analysis: 静态分析:

1 errors were found during analysis. 分析期间发现1个错误。

1 Unexpected beginning of statement. 1意外的语句开始。 (near "jos" at position 0) (在位置0的“ jos”附近)

SQL query: SQL查询:

jos-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:3306 -- Tiempo de generación: 18-03-2019 a las 18:52:56 -- Versión del servidor: 5.5.61-cll -- Versión de PHP: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO" jos-- phpMyAdmin SQL Dump-版本4.8.3- https ://www.phpmyadmin.net/--Servidor:localhost:3306-Tiempodegeneración:18-03-2019 a las 18:52: 56-版本服务器:5.5.61-cll-PHP版本:7.2.7 SET SQL_MODE =“ NO_AUTO_VALUE_ON_ZERO”

MySQL said: MySQL说:

1064 - You have an error in your SQL syntax; 1064-您的SQL语法有误; check the manual that corresponds to your MySQL server version for the right syntax to use near 'jos-- phpMyAdmin SQL Dump 检查与您的MySQL服务器版本相对应的手册以获取在'jos附近使用的正确语法-phpMyAdmin SQL Dump
-- version 4.8.3 -版本4.8.3

I need your help. 我需要你的帮助。 I have another question about this, I'll take one step at a time. 我对此有另一个疑问,我会一步一步。

If you exported your database from the phpmyadmin by selecting a database from the left sidebar and then exported them by pressing Export Button you can import that database in phpmyadmin using Import Button. 如果通过从左侧边栏中选择一个数据库从phpmyadmin导出数据库,然后按“导出”按钮将其导出,则可以使用“导入”按钮在phpmyadmin中导入该数据库。

  1. Create a new table by pressing New from the left sidebar where is listed all of your databases 通过单击左侧列出所有数据库的侧栏中的“新建”来创建新表
  2. Select database where you want to import data 选择要导入数据的数据库
  3. Browse to the .sql file which you've downloaded previously using the export command 使用export命令浏览到您先前下载的.sql文件
  4. Press Go button at the end of the page. 按页面末尾的“执行”按钮。

1st step - Click New 第一步-单击新建 在此处输入图片说明

2nd step - Choose collation and click Create 第二步-选择排序规则,然后单击创建 在此处输入图片说明

And you will see your database test in sidebar db list 您将在侧边栏数据库列表中看到数据库test 在此处输入图片说明

After that you click on test database to select them and click button Import(choose sql file with your database and click Go to import data from the sql file) 之后,单击测试数据库以选择它们,然后单击导入按钮(选择数据库中的sql文件,然后单击执行以从sql文件中导入数据)

I got it. 我知道了。 It took time and thanks to your guidance... I got it. 花费了时间,并且感谢您的指导...我明白了。 You must create the database in cPanel, import the tables and wait a 'few' hours for it to be enabled in phpMyAdmin. 您必须在cPanel中创建数据库,导入表并等待“几个”小时才能在phpMyAdmin中启用它。 Thank you, @Matija. 谢谢@Matija。

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

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