问题
I have an android app which I would like to connect to my backend. The backend calls are made by PHP scripts while the database is built using mysql. I uploaded the app on hostagtor.
I want to migrate that database on google cloud sql. Things I've done so far is:
- Created a bucket on google cloud storage
- Uploaded the sql dump in the bucket.
Error: - When I am trying to upload it to the Google cloud sql, it throws an error!
while importing into Clousql I wrote: gs://mybucket/abc.sql, while database name was left blank.
回答1:
My problem was the file I uploaded wasn't encoded as UTF-8 without BOM.
回答2:
Common mistakes are:
Missing
use <database>
statement at the beginning of the dump file.The database does not exists.
You did not use
--hex-blob
option while generating the dump.
来源:https://stackoverflow.com/questions/19225271/an-unknown-error-occurred