#1064 - You have a syntax error in your SQL next to 'DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci' on line 1

Asked

Viewed 1,201 times

0

So guys, I exported a database from the school where I study only that I exported the database from an old mysql so it Gero another xml code for me and need to import it to a latest mysql it from this error 1046 has any way to run it in current mysql? like?

code error :

Erro

Análise estática:

1 1 erros foram encontrados durante a análise.

    Era esperado o nome da entidade. (near "DEFAULT CHARACTER SET" at position 31)

Query SQL:

CREATE DATABASE IF NOT EXISTS DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

Mensagem do MySQL: Documentação
#1064 - Você tem um erro de sintaxe no seu SQL próximo a 'DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci' na linha 1

1 answer

1

Missed you put the name of your database....

CREATE DATABASE IF NOT EXISTS MinhaDataBase DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

To run in your most current Mysql just give a name to the DATABASE who is creating.

  • sorry guy I ask where it goes I don’t know xml I just exported it to make my tcc I never messed with xml

  • @Adrianorufino if you want to import an XML that has all the SQL creation, put the XML content in the question so we can help. You could import the XML and when your manager opens the text of it, you could edit in hand even as I showed in my reply

Browser other questions tagged

You are not signed in. Login or sign up in order to post.