V
V
vlad_lutsky2018-05-04 12:34:07
MySQL
vlad_lutsky, 2018-05-04 12:34:07

Why is mysql import error?

There are 2 Mysql on different servers, you need to transfer from one to another Mysql
version is the same - in one I press export (sql) in another import (sql) gives an error:

Ошибка
Статический анализ:

Найдено 11 ошибок при анализе.

Неожиданный символ. (near "{" at position 247)
Неожиданное начало выражения. (near "DOCTYPE" at position 2)
Неожиданное начало выражения. (near "HTML" at position 10)
Неожиданное начало выражения. (near "html" at position 16)
Неожиданное начало выражения. (near "lang" at position 21)
Неожиданное начало выражения. (near "'ru'" at position 26)
Неожиданное начало выражения. (near "dir" at position 31)
Неожиданное начало выражения. (near "'ltr'" at position 35)
Неожиданное начало выражения. (near "head" at position 42)
Неожиданное начало выражения. (near "meta" at position 48)
Неизвестный оператор. (near "charset" at position 53)
SQL запрос:

<!DOCTYPE HTML><html lang='ru' dir='ltr'><head><meta charset="utf-8" /><meta name="referrer" content="no-referrer" /><meta name="robots" content="noindex,nofollow" /><meta http-equiv="X-UA-Compatible" content="IE=Edge" /><style id="cfs-style">html{display: none

Ответ MySQL: Документация

#1064 - У вас ошибка в запросе. Изучите документацию по используемой версии MariaDB на предмет корректного синтаксиса около '<!DOCTYPE HTML><html lang='ru' dir='ltr'><head><meta charset="utf-8" /><meta nam' на строке 1

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ilya, 2018-05-04
@vlad_lutsky

Hm. Are you sure you are importing SQL code and not HTML page?)

M
Maxim Timofeev, 2018-05-04
@webinar

SQL запрос:
<!DOCTYPE HTML><html lan

it's not sql query, it's html. You shove your finger into the coin slot and are surprised there's no soda. )))
Everything clearly says the error. If instead of sql syntax to zasandalit an arbitrary number of characters - will be the same. You can try to import your photo. Anything that is not an sql query will give this error.
Let's figure out what's wrong with exporting. You are obviously not saving the database correctly.

E
Evgeny Petrov, 2018-05-04
@borgore

Can you provide a snippet of the request?

M
Metatron1983, 2022-04-19
@Metatron1983

I'm not sure that it is still relevant, but at one time I broke my head while solving a similar problem.
If you have html html instead of sql (this is an error page - look through vscode) then you either have an error in the phpmyadmin or mysql configuration files. It's impossible to find exactly where. there are several exits. The first is to demolish everything and reinstall (but you will erase the database) or the second is to export via the console (the command is called mysqldump - google the information is full). There is a nuance for XAMPP. If you unload through this assembly, then you need to run not mysql.exe, but mysqldump.exe (also google mysqldump.exe XAMPP). Then all the norms export and import. Good luck to all!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question