Go Back   HostGator Peer Support Forums > Public Forums > Pre-Sales Questions

Notices

Reply
 
Thread Tools
  #1  
Old 11-10-2007, 09:52 PM
theraven theraven is offline
Hatchling Croc
 
Join Date: Sep 2007
Posts: 12
Default MySQL import

I just signed up today and am having some issues importing the SQL file from my old host over to HostGator. I created a database and user using the Cpanel, but when I try to import the old SQL file through PHPMyAdmin I get the following message (with the username and database blanked out):
#1044 - Access denied for user '***'@'localhost' to database '***'

Can anyone shed some light on what I'm doing wrong?

Thanks.
Reply With Quote
  #2  
Old 11-10-2007, 09:58 PM
GvilleRick's Avatar
GvilleRick GvilleRick is offline
Emperor Croc
 
Join Date: Jan 2007
Location: Greenville, SC
Posts: 2,578
Default Re: MySQL import

Did you add the user to the database? After you create the database and user you will need to add the user to the database using the dropdown menu in the MySQL section.
Reply With Quote
  #3  
Old 11-10-2007, 10:01 PM
theraven theraven is offline
Hatchling Croc
 
Join Date: Sep 2007
Posts: 12
Default Re: MySQL import

Yes, I added the user to the database. I guess one of my first questions would be how to login as that user when using phpMyAdmin - because I don't see any option to do so when clicking the phpMyAdmin link from the Cpanel.
Reply With Quote
  #4  
Old 11-10-2007, 10:10 PM
GvilleRick's Avatar
GvilleRick GvilleRick is offline
Emperor Croc
 
Join Date: Jan 2007
Location: Greenville, SC
Posts: 2,578
Default Re: MySQL import

phpMyAdmin should be able to access any databases created by your username. Sounds like you should contact the Help Desk and have someone take a look.

If the old host ran cPanel you can request having HG move the site over. That would include all of the databases, etc.
Reply With Quote
  #5  
Old 11-11-2007, 09:41 AM
Goddess Dix's Avatar
Goddess Dix Goddess Dix is offline
King Croc
 
Join Date: Aug 2006
Location: KS, USA
Posts: 1,466
Default Re: MySQL import

Quote:
Originally Posted by theraven View Post
Yes, I added the user to the database. I guess one of my first questions would be how to login as that user when using phpMyAdmin - because I don't see any option to do so when clicking the phpMyAdmin link from the Cpanel.
the user is added to the database in the cpanel mysql options, not from phpmyadmin. it lists databases and users and you attach the users to the database there. don't forget that both databases and users are started with your account user name, so a db named database1 with would be called user_database1, and the user name would be user_databaseusername...
Reply With Quote
  #6  
Old 11-11-2007, 05:45 PM
theraven theraven is offline
Hatchling Croc
 
Join Date: Sep 2007
Posts: 12
Default Re: MySQL import

Thanks, Support was able to import the SQL file (they had to comment out a couple lines). My site is pretty much moved over now, but I'm having an issue with SEF turned on in Mambo for some reason. I've submitted a request for Support to take a look at it.
Reply With Quote
  #7  
Old 12-04-2008, 03:23 PM
neocorps neocorps is offline
Hatchling Croc
 
Join Date: Aug 2008
Posts: 16
Default Re: MySQL import

hi!, do u know what lines were commented from the sql file?, because i have a database from wamp i want to upload, but i seem to have the same problem that you have.

Thx
Reply With Quote
  #8  
Old 12-04-2008, 03:43 PM
quietFinn's Avatar
quietFinn quietFinn is offline
Emperor Croc
 
Join Date: Feb 2005
Posts: 2,765
Default Re: MySQL import

Quote:
Originally Posted by neocorps View Post
hi!, do u know what lines were commented from the sql file?, because i have a database from wamp i want to upload, but i seem to have the same problem that you have.

Thx
Most likely the lines where the database is created.
You can't create a database in cPanel's PHPMyAdmin.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #9  
Old 12-06-2008, 06:59 PM
lsuedulive lsuedulive is offline
Banned User
 
Join Date: Dec 2008
Posts: 22
Default Re: MySQL import

Sounds like from 2007 you are the DB and SQL expert.

Good for you.

Quote:
Originally Posted by GvilleRick View Post
Did you add the user to the database? After you create the database and user you will need to add the user to the database using the dropdown menu in the MySQL section.
Reply With Quote
  #10  
Old 07-27-2009, 12:39 PM
corbacho corbacho is offline
Hatchling Croc
 
Join Date: Jul 2009
Posts: 1
Default Re: MySQL import

Hi, I have same kind of problem and I fix it this way:

If you have a phpMyadmin backup file, (.gz file) don't try to restore it through phpMyadmin, it will tell u access denied and other errors due of the fact that is different username

The right way to do it, it's through cPanel -> Backup -> Restore MySQL

But first, open the .sql file and delete or comment the lines at the beggining that says about CREATE DATABASE (...), USE DATABASE (...)

That's all, hope it helps to someone
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 09:59 AM.

 
Forum SEO by Zoints