Re: ローカル環境から本番環境へのデータベース移行でエラーになります

2021年3月19日 at 15:04

SQL query:

<!DOCTYPE HTML><html lang='ja' 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" /><meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="icon" href="favicon.ico" type="image/x-icon" /><link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /><link rel="stylesheet" type="text/css" href="./themes/original/jquery/jquery-ui.css" /><link rel="stylesheet" type="text/css" href="js/vendor/codemirror/lib/codemirror.css?v=4.9.7" /><link rel="stylesheet" type="text/css" href="js/vendor/codemirror/addon/hint/show-hint.css?v=4.9.7" /><link rel="stylesheet" type="text/css" href="js/vendor/codemirror/addon/lint/lint.css?v=4.9.7" /><link rel="stylesheet" type="text/css" href="phpmyadmin.css.php?nocache=6445344463ltr&server=1" /><link rel="stylesheet" type="text/css" href="./themes/original/css/printview.css?v=4.9.7" media="pri[...]


MySQL のメッセージ:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<!DOCTYPE HTML><html lang='ja' dir='ltr'><head><meta charset="utf-8" /><meta nam' at line 1

Re: ローカル環境から本番環境へのデータベース移行でエラーになります

2021年3月19日 at 15:06
ローカルでデータベースをエクスポートしたときにエラーになってます。拡張子自体は.sqlなんだと思いますが、テキストエディタで中身を見たら、エラーが確認できると思います。
 

Re: Re: ローカル環境から本番環境へのデータベース移行でエラーになります

2021年3月19日 at 15:15
あ、早速のご連絡ありがとうございます!
拡張子.sqlのファイルを確認してみます。
 

Re: Re: ローカル環境から本番環境へのデータベース移行でエラーになります

2021年3月19日 at 15:36
takuro hishikawa様

そもそも私がデータベースに関して超初心者なのですが、エクスポートした「.sql」のファイルをMac用テキストエディタ「mi」で開くと、この添付画像の状態です。これ、構文のエラーどころか、まったく違う内容じゃないかなと思うのですが…、いかがでしょうか?
 

Re: ローカル環境から本番環境へのデータベース移行でエラーになります

2021年3月19日 at 15:52
SQLの構文エラーではなく、出力自体がエラーで正しく行われなかったと言うことです。