An unknown error occurred in Cloud SQL import...

1,036 views
Skip to first unread message

Hans Simtanda Caspersen

unread,
Oct 4, 2013, 5:18:32 PM10/4/13
to google-cloud...@googlegroups.com
Hi, i am getting An unknown error occurred in Cloud SQL import with the following sql file:

-------------------------

DROP TABLE `myTestTable`;

CREATE TABLE `myTestTable` (
  `id` mediumint(8) unsigned NOT NULL auto_increment,
  `test` varchar(255) default NULL,
  PRIMARY KEY (`id`)
) AUTO_INCREMENT=1;

INSERT INTO `myTestTable` (`test`) VALUES ("Miranda");
INSERT INTO `myTestTable` (`test`) VALUES ("Margaret");
INSERT INTO `myTestTable` (`test`) VALUES ("Margaret");
INSERT INTO `myTestTable` (`test`) VALUES ("Charlotte");
INSERT INTO `myTestTable` (`test`) VALUES ("Aileen");
INSERT INTO `myTestTable` (`test`) VALUES ("Kylie");
INSERT INTO `myTestTable` (`test`) VALUES ("Candice");
INSERT INTO `myTestTable` (`test`) VALUES ("Zia");
INSERT INTO `myTestTable` (`test`) VALUES ("Dakota");
INSERT INTO `myTestTable` (`test`) VALUES ("Quail");
INSERT INTO `myTestTable` (`test`) VALUES ("Leilani");
INSERT INTO `myTestTable` (`test`) VALUES ("Ivy");
INSERT INTO `myTestTable` (`test`) VALUES ("Roanna");
INSERT INTO `myTestTable` (`test`) VALUES ("Orla");
INSERT INTO `myTestTable` (`test`) VALUES ("Jane");
INSERT INTO `myTestTable` (`test`) VALUES ("Jena");
INSERT INTO `myTestTable` (`test`) VALUES ("Isabelle");
INSERT INTO `myTestTable` (`test`) VALUES ("Fredericka");
INSERT INTO `myTestTable` (`test`) VALUES ("Adara");
INSERT INTO `myTestTable` (`test`) VALUES ("Joan");
INSERT INTO `myTestTable` (`test`) VALUES ("Abra");
INSERT INTO `myTestTable` (`test`) VALUES ("Darrel");
INSERT INTO `myTestTable` (`test`) VALUES ("Demetria");
INSERT INTO `myTestTable` (`test`) VALUES ("Aurora");
INSERT INTO `myTestTable` (`test`) VALUES ("Alea");
INSERT INTO `myTestTable` (`test`) VALUES ("Fleur");
INSERT INTO `myTestTable` (`test`) VALUES ("Teagan");
INSERT INTO `myTestTable` (`test`) VALUES ("Galena");
INSERT INTO `myTestTable` (`test`) VALUES ("Carly");
INSERT INTO `myTestTable` (`test`) VALUES ("Isadora");
INSERT INTO `myTestTable` (`test`) VALUES ("Rylee");
INSERT INTO `myTestTable` (`test`) VALUES ("Samantha");
INSERT INTO `myTestTable` (`test`) VALUES ("Allegra");
INSERT INTO `myTestTable` (`test`) VALUES ("Janna");
INSERT INTO `myTestTable` (`test`) VALUES ("Zorita");
INSERT INTO `myTestTable` (`test`) VALUES ("Amena");
INSERT INTO `myTestTable` (`test`) VALUES ("Xaviera");
INSERT INTO `myTestTable` (`test`) VALUES ("Camille");
INSERT INTO `myTestTable` (`test`) VALUES ("Amber");
INSERT INTO `myTestTable` (`test`) VALUES ("Cherokee");
INSERT INTO `myTestTable` (`test`) VALUES ("Tana");
INSERT INTO `myTestTable` (`test`) VALUES ("Maggie");
INSERT INTO `myTestTable` (`test`) VALUES ("Madison");
INSERT INTO `myTestTable` (`test`) VALUES ("Nicole");
INSERT INTO `myTestTable` (`test`) VALUES ("Guinevere");
INSERT INTO `myTestTable` (`test`) VALUES ("Allegra");
INSERT INTO `myTestTable` (`test`) VALUES ("Callie");
INSERT INTO `myTestTable` (`test`) VALUES ("Petra");
INSERT INTO `myTestTable` (`test`) VALUES ("Hadassah");
INSERT INTO `myTestTable` (`test`) VALUES ("Cameran");
INSERT INTO `myTestTable` (`test`) VALUES ("Ciara");
INSERT INTO `myTestTable` (`test`) VALUES ("Hadley");
INSERT INTO `myTestTable` (`test`) VALUES ("Hollee");
INSERT INTO `myTestTable` (`test`) VALUES ("Jeanette");
INSERT INTO `myTestTable` (`test`) VALUES ("Ivy");
INSERT INTO `myTestTable` (`test`) VALUES ("Ima");
INSERT INTO `myTestTable` (`test`) VALUES ("Pascale");
INSERT INTO `myTestTable` (`test`) VALUES ("Gretchen");
INSERT INTO `myTestTable` (`test`) VALUES ("Nichole");
INSERT INTO `myTestTable` (`test`) VALUES ("Sydney");
INSERT INTO `myTestTable` (`test`) VALUES ("Petra");
INSERT INTO `myTestTable` (`test`) VALUES ("Kendall");
INSERT INTO `myTestTable` (`test`) VALUES ("Nomlanga");
INSERT INTO `myTestTable` (`test`) VALUES ("Reagan");
INSERT INTO `myTestTable` (`test`) VALUES ("Virginia");
INSERT INTO `myTestTable` (`test`) VALUES ("Noelle");
INSERT INTO `myTestTable` (`test`) VALUES ("Sara");
INSERT INTO `myTestTable` (`test`) VALUES ("Tasha");
INSERT INTO `myTestTable` (`test`) VALUES ("Sheila");
INSERT INTO `myTestTable` (`test`) VALUES ("Simone");
INSERT INTO `myTestTable` (`test`) VALUES ("Ayanna");
INSERT INTO `myTestTable` (`test`) VALUES ("Phoebe");
INSERT INTO `myTestTable` (`test`) VALUES ("Judith");
INSERT INTO `myTestTable` (`test`) VALUES ("Nelle");
INSERT INTO `myTestTable` (`test`) VALUES ("Jena");
INSERT INTO `myTestTable` (`test`) VALUES ("Rinah");
INSERT INTO `myTestTable` (`test`) VALUES ("Olympia");
INSERT INTO `myTestTable` (`test`) VALUES ("Lillian");
INSERT INTO `myTestTable` (`test`) VALUES ("Lacota");
INSERT INTO `myTestTable` (`test`) VALUES ("Angelica");
INSERT INTO `myTestTable` (`test`) VALUES ("Olga");
INSERT INTO `myTestTable` (`test`) VALUES ("Patience");
INSERT INTO `myTestTable` (`test`) VALUES ("Imelda");
INSERT INTO `myTestTable` (`test`) VALUES ("Ava");
INSERT INTO `myTestTable` (`test`) VALUES ("Chanda");
INSERT INTO `myTestTable` (`test`) VALUES ("Rowan");
INSERT INTO `myTestTable` (`test`) VALUES ("Justine");
INSERT INTO `myTestTable` (`test`) VALUES ("Tatiana");
INSERT INTO `myTestTable` (`test`) VALUES ("Callie");
INSERT INTO `myTestTable` (`test`) VALUES ("Catherine");
INSERT INTO `myTestTable` (`test`) VALUES ("Rhonda");
INSERT INTO `myTestTable` (`test`) VALUES ("Summer");
INSERT INTO `myTestTable` (`test`) VALUES ("Molly");
INSERT INTO `myTestTable` (`test`) VALUES ("Keely");
INSERT INTO `myTestTable` (`test`) VALUES ("Melyssa");
INSERT INTO `myTestTable` (`test`) VALUES ("Maile");
INSERT INTO `myTestTable` (`test`) VALUES ("Clementine");
INSERT INTO `myTestTable` (`test`) VALUES ("Kaitlin");
INSERT INTO `myTestTable` (`test`) VALUES ("Kiara");
INSERT INTO `myTestTable` (`test`) VALUES ("Amity");

Amit Mondal

unread,
Oct 4, 2013, 5:37:22 PM10/4/13
to google-cloud...@googlegroups.com
Are you missing "USE <database>" at the beginning?


--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/7432ef04-8687-4e4e-8b80-b5fd6d304c62%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hans Simtanda Caspersen

unread,
Oct 4, 2013, 6:05:11 PM10/4/13
to google-cloud...@googlegroups.com
I have added ( USE autobooksdatabase; ), but with no success

------------------------------------------

USE autobooksdatabase;
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.

Amit Mondal

unread,
Oct 4, 2013, 6:53:08 PM10/4/13
to google-cloud...@googlegroups.com
what is the instance name?


To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/1b3a695f-3c8a-4037-9772-26b69b025309%40googlegroups.com.

Hans Simtanda Caspersen

unread,
Oct 4, 2013, 7:01:22 PM10/4/13
to google-cloud...@googlegroups.com
hi, Instance ID: abcategories-com:authorbooksdatabase and Instance Name: authorbooksdatabase

Note that i have corrected USE autobooksdatabase; to USE authorbooksdatabase; and i am stil getting an unknown error
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscr...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.

Amit Mondal

unread,
Oct 4, 2013, 7:44:13 PM10/4/13
to google-cloud...@googlegroups.com
The error is:

"mysql_query Unknown database \'authorbooksdatabase\' (USE authorbooksdatabase)"



To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/3d60d2ff-d3c0-4343-b04f-810f0d833729%40googlegroups.com.

Hans Simtanda Caspersen

unread,
Oct 4, 2013, 7:58:52 PM10/4/13
to google-cloud...@googlegroups.com
Im not sure i fully understand, but i have now replaced:

USE authorbooksdatabase;

with

USE authorbooksdatabase

Meaning i have removed ; in my sql file

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.

Hans Simtanda Caspersen

unread,
Oct 4, 2013, 7:59:54 PM10/4/13
to google-cloud...@googlegroups.com
still with no luck

Amit Mondal

unread,
Oct 4, 2013, 8:10:41 PM10/4/13
to google-cloud...@googlegroups.com

Does the database exist?

To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/16cd4d6b-737b-4547-ad6f-8a7d4e0b3100%40googlegroups.com.

Hans Simtanda Caspersen

unread,
Oct 4, 2013, 8:19:34 PM10/4/13
to google-cloud...@googlegroups.com
yes, i have attached a screen shot

Does the database exist?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.
db.jpg

Hans Simtanda Caspersen

unread,
Oct 5, 2013, 3:24:08 PM10/5/13
to google-cloud...@googlegroups.com
Amit Mondal, could the error be occurring, because my sql file is not a hex type, but instead it is a binary/octet-stream according to google cloud storage...

Razvan Musaloiu-E.

unread,
Oct 5, 2013, 5:43:35 PM10/5/13
to google-cloud...@googlegroups.com
Can you use the 'SQL Prompt' and do a 'CREATE DATABASE authorbooksdatabase'? The screenshot just shows that the instance abcategories-com:authorbooksdatabase exists. You can see the databases by doing a 'SHOW DATABASES'.

-- Razvan ME


To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/971372cf-55ed-43da-b768-ab6308be48c9%40googlegroups.com.

Hans Simtanda Caspersen

unread,
Oct 5, 2013, 5:49:54 PM10/5/13
to google-cloud...@googlegroups.com
i cant find the sql prompt

Does the database exist?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.

Hans Simtanda Caspersen

unread,
Oct 5, 2013, 5:58:58 PM10/5/13
to google-cloud...@googlegroups.com
do i find it in cloudsql or app engine?

Razvan Musaloiu-E.

unread,
Oct 5, 2013, 6:01:57 PM10/5/13
to google-cloud...@googlegroups.com
You will see it in code.google.com/apis/console. Take a look at the above screenshot.

-- Razvan ME


To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/41e5203d-e50c-4b6d-8156-bbc1d12624d6%40googlegroups.com.
3soakKGPS.png

Hans Simtanda Caspersen

unread,
Oct 5, 2013, 7:19:08 PM10/5/13
to google-cloud...@googlegroups.com
done, i have now created a database called authorbooksdatabase, but im still getting an unknown error when importing.

my sql file looks like this:

USE authorbooksdatabase;

DROP TABLE `myTestTable`;

CREATE TABLE `myTestTable` (
  `id` mediumint(8) unsigned NOT NULL auto_increment,
  `test` varchar(255) default NULL,
  PRIMARY KEY (`id`)
) AUTO_INCREMENT=1;

INSERT INTO `myTestTable` (`test`) VALUES ("Miranda");
INSERT INTO `myTestTable` (`test`) VALUES ("Margaret");
INSERT INTO `myTestTable` (`test`) VALUES ("Margaret");

PS: What am i doing wrong?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.

Razvan Musaloiu-E.

unread,
Oct 5, 2013, 7:26:23 PM10/5/13
to google-cloud...@googlegroups.com
The error you are hitting now is:

Unknown table \'myTestTable\' (DROP TABLE `myTestTable`)

Can you replace the 'DROP TABLE' with 'DROP TABLE IF EXISTS'?

How did you obtain the MySQL dump? If you can do another one can you make sure you use something like this:

mysqldump --databases database_name [-u username -p password] --hex-blob > database_file.sql

The above recommendation comes from the Cloud SQL docs: Importing data.

-- Razvan ME


To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/bf150337-9385-4019-9b38-0c25fc2cf7ab%40googlegroups.com.

Hans Simtanda Caspersen

unread,
Oct 5, 2013, 7:42:36 PM10/5/13
to google-cloud...@googlegroups.com
ok, i got the sql dump from http://www.generatedata.com just to test google sql import.

Otherwise im using mysqldumper to create multi gzip dumps, but i cant see where and how i should aply:

 mysqldump --databases database_name [-u username -p password] --hex-blob > database_file.sql

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.

Razvan Musaloiu-E.

unread,
Oct 5, 2013, 7:54:08 PM10/5/13
to google-cloud...@googlegroups.com
I'm not familiar with either generatedata or the mysqldumper so there is not much I can help on that front. :-( The Cloud SQL import simply issues the queries from the import file one by one and expects all of them to succeed. So make sure the import file contains queries that don't fail. Dropping a table that doesn't exist will generate a failure. Creating a table that exists is will also generate a failure.

-- Razvan ME


To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/4f947c2e-727f-448d-a871-b7ca89f66178%40googlegroups.com.

Hans Simtanda Caspersen

unread,
Oct 5, 2013, 8:02:13 PM10/5/13
to google-cloud...@googlegroups.com
By the way i replaced the 'DROP TABLE' with 'DROP TABLE IF EXISTS' and my import is now a success, so thanks.

Final question, after a successful import, where can i acces my database and its tables...

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.

Razvan Musaloiu-E.

unread,
Oct 5, 2013, 8:37:51 PM10/5/13
to google-cloud...@googlegroups.com
You can access the Cloud SQL instance using the command line tool [1], the SQL Prompt, App Engine [2] or via JDBC [3].


-- Razvan ME


To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/3283a8a5-e048-4d38-8aef-0c728a7cbc9a%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages