Renaming MySQL database?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I transferred muy web sites to a new host and am having a problem with a
MySql database. In the old host, I selected Cpanel, MySql Databases,
PHPadministration and then used "Export" to save the file to my computer.

In the new host I did the same thing except this time I used "Import"
but got the following error message:


SQL query:

-- phpMyAdmin SQL Dump
-- version
-- Host: localhost
-- Generation Time: Oct 09, 2006 at 12:05 PM
-- Server version: 4.0.27
-- PHP Version: 4.4.2
-- Database: `olduser_phpb1`
CREATE DATABASE `olduser_phpb1` ;

MySQL said: Documentation
#1044 - Access denied for user 'newuser'@'localhost' to database


The problem starts with the fact that the "user" name on the new host(
newuser) is not the same as the "user" name on the old host (olduser).
Even though I renamed the file from "olduser_phpb1" to "newuser_phpb1",
I get the error message shown above.

I suspect that the user name and probably a password is imbedded in the
old file and I need to modify the file contents somehow.

Any ideas how to do this? I have MySQL installed on my desktop but have
never really used it.

Re: Renaming MySQL database?

Arnie Goetchius wrote:
Quoted text here. Click to load it


Your new host should be helping you.

A PhPMyAdmin export does not put any userid/keyword in the database.
But here you did tell it to create the database when you exported it,
and your PhPMyAdmin user doesn't have the authority to create a database.

You should be able to remove the create database statement from your
export file.  But I don't know what else might be in there.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: Renaming MySQL database?

Jerry Stuckle wrote:
Quoted text here. Click to load it


Thanks. They are going to handle it. I like DIY but this over my head.
Quoted text here. Click to load it

Site Timeline