Jump to content

Archived

This topic is now archived and is closed to further replies.

kreek

MYSQL Error Help (Newbie)

Recommended Posts

I exported a database but when I imported it it gave me an error message such as "Database already exists" so I edited the file manually and erased the part CREATE DATABASE kreek_db something like that and now I have errors and I can't undo it the error is:

SQL query:

-- phpMyAdmin SQL Dump
-- version 2.8.0-rc1
-- http://www.phpmyadmin.net
--
-- Host: sql2.pandela.com
-- Generation Time: Sep 22, 2006 at 02:06 AM
-- Server version: 4.1.18
-- PHP Version: 5.1.2
--
SQL query:

-- phpMyAdmin SQL Dump
-- version 2.8.0-rc1
-- http://www.phpmyadmin.net
--
-- Host: sql2.pandela.com
-- Generation Time: Sep 22, 2006 at 02:06 AM
-- Server version: 4.1.18
-- PHP Version: 5.1.2
--
CREATE DATABASE `kreek_db` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;



MySQL said: 

#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 '
CREATE DATABASE `kreek_db` DEFAULT CHARACTER SET latin1 COLLATE latin1_swed' at line 1

MySQL said: 

#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 '
CREATE DATABASE `kreek_db` DEFAULT CHARACTER SET latin1 COLLATE latin1_swed' at line 1

Share this post


Link to post
Share on other sites
You said that you erase "CREATE DATABASE ...", but the error mentions that line.  Are you sure you erased it?

Share this post


Link to post
Share on other sites
You can also add the "IF NOT EXISTS".

Share this post


Link to post
Share on other sites
Than I added it again. But I know I screwed up somewhere because when I first erased it I didn't undo it than later I pasted the create part from another database and edited it. I don't know nothing about mysql and now I can't even get this data back on the database.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.