Results 1 to 11 of 11
Thread: restore db fails
-
08-31-2007, 08:56 AM #1Web Hosting Master
- Join Date
- Jan 2007
- Posts
- 688
restore db fails
root@server [~]# mysql -u divingho_dhadmin -p divingho_divinghols < /home/divingho/mysql/divinghols.sql
Enter password:
ERROR 1044 (42000) at line 11: Access denied for user 'divingho_dhadmin'@'localhost' to database 'divinghols'
The username is right, the password I use is correct. I even deleted, recreated the mysql database and username, still giving the same error. The path to sql file is right and only 68k in size.
Using mysql 4.1
-
08-31-2007, 09:06 AM #2Web Hosting Evangelist
- Join Date
- Jun 2006
- Location
- Cluj Napoca
- Posts
- 469
-
08-31-2007, 09:09 AM #3Web Hosting Master
- Join Date
- Jan 2007
- Posts
- 688
Yes I did that, still giving off the same error
-
08-31-2007, 09:10 AM #4Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
Try this command.
mysql -u divingho_dhadmin -D divingho_divinghols -pPASSWORD < /home/divingho/mysql/divinghols.sqlDavid | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
08-31-2007, 09:21 AM #5Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
Chris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
08-31-2007, 09:39 AM #6WHT Addict
- Join Date
- Jan 2006
- Location
- Somewhere in USA
- Posts
- 110
Did you allocated the user to the database, if you have Cpanel you can do that from the Cpanel account ?
https://www.vpnin.net - Reliable and secure vpn services
-
08-31-2007, 09:47 AM #7Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
Hang on, this is all wrong:
ERROR 1044 (42000) at line 11
Edit: Take out the create database statement and you should be set. The database name and password were correct or you wouldn't have got as far as line 11.Chris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
08-31-2007, 10:55 AM #8Web Hosting Master
- Join Date
- Jan 2006
- Location
- Athens, Greece
- Posts
- 1,481
The error is clear, the user doesn't have privileges to the database
-
08-31-2007, 11:56 AM #9Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
08-31-2007, 04:40 PM #10Web Hosting Master
- Join Date
- May 2006
- Location
- India
- Posts
- 661
You can go a head and restore that MySQL in the superuser(as root) context, and then grant correct privileges for the user to access this DB
██ SparkSupport.Com - The Premier Tech Company
██ Cloud Solutions|Email Infra setup|VOIP|Video Streaming|Software Development
██ Email: info@sparksupport.com █ Phone : 1- 408-600-1449 | Skype : shijils
-
08-31-2007, 09:30 PM #11Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
Well, he could do that but then he'd have a database (divinghols) that's completely out of cpanel's control because it doesn't follow the correct naming convention (divingho_divinghols).
He's already created the new database in cpanel, he just needs to take out the lines "create database divinghols" and "use divinghols" from the sql file.Chris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter