Page 1 of 1

(RESOLVED) Upadating a database in phpMyAdmin

Posted: Fri Aug 25, 2006 6:58 pm
by LuiePL
I have just purchased a new domain today, and I am in the process of transferring my information that was stored in a couple mySQL databases to it's new, permanent home. With my hosting service I have to create the database, then assign permissions to it before I can add data. I didn't think it would be a problem at first. I uploaded my first database from the old site to the new one, and everything was going smoothly. I went to upload a second database, after creating it and assigning the proper permissions. Once uploaded, I noticed the information didn't go into the second DB, but rather into the first one.

I saved the data as a *.sql file, and it gives the right name for where I want it to go (ie "Database: `host_DB2`"). I deleted the following from the sql file:

Code: Select all

CREATE DATABASE `host_DB2` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `host_DB2`;
I'm wondering if I need to change that to an "UPDATE" line, but when I put "UPDATE DATABASE", it gives me a syntax error. Any ideas, or suggestions? Thanks for the help in advance.

Posted: Fri Aug 25, 2006 7:11 pm
by RobertGonzalez
Your database name will need to be changed in all areas of the .sql file that references it. Especially in the line that says

Code: Select all

USE `host_DB2`;

Posted: Fri Aug 25, 2006 9:08 pm
by LuiePL
Everah wrote:Your database name will need to be changed in all areas of the .sql file that references it. Especially in the line that says

Code: Select all

USE `host_DB2`;
I did that, but since I can't create a database through mySQL, that line doesn't work.

However, Inotcied if I go into the table itself, and select import, it works, so it looks like its fixed!

Posted: Fri Aug 25, 2006 10:38 pm
by RobertGonzalez
What are the user permissions on the table for your user profile.

Posted: Sat Aug 26, 2006 2:45 am
by LuiePL
The user permission is set to "all"