kreek Posted September 22, 2006 Share Posted September 22, 2006 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 Link to comment https://forums.phpfreaks.com/topic/21615-mysql-error-help-newbie/ Share on other sites More sharing options...
btherl Posted September 22, 2006 Share Posted September 22, 2006 You said that you erase "CREATE DATABASE ...", but the error mentions that line. Are you sure you erased it? Link to comment https://forums.phpfreaks.com/topic/21615-mysql-error-help-newbie/#findComment-96517 Share on other sites More sharing options...
fenway Posted September 22, 2006 Share Posted September 22, 2006 You can also add the "IF NOT EXISTS". Link to comment https://forums.phpfreaks.com/topic/21615-mysql-error-help-newbie/#findComment-96597 Share on other sites More sharing options...
kreek Posted September 22, 2006 Author Share Posted September 22, 2006 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. Link to comment https://forums.phpfreaks.com/topic/21615-mysql-error-help-newbie/#findComment-97009 Share on other sites More sharing options...
fenway Posted September 25, 2006 Share Posted September 25, 2006 Huh? Link to comment https://forums.phpfreaks.com/topic/21615-mysql-error-help-newbie/#findComment-97924 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.