(RESOLVED) Upadating a database in phpMyAdmin

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
LuiePL
Forum Commoner
Posts: 40
Joined: Fri Aug 04, 2006 11:38 pm

(RESOLVED) Upadating a database in phpMyAdmin

Post 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.
Last edited by LuiePL on Fri Aug 25, 2006 9:08 pm, edited 1 time in total.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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`;
LuiePL
Forum Commoner
Posts: 40
Joined: Fri Aug 04, 2006 11:38 pm

Post 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!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

What are the user permissions on the table for your user profile.
LuiePL
Forum Commoner
Posts: 40
Joined: Fri Aug 04, 2006 11:38 pm

Post by LuiePL »

The user permission is set to "all"
Post Reply