From Ensim: ERROR 1045 (28000): Access denied for user [email protected]

antispam

Member
Nov 26, 2012
8
0
1
cPanel Access Level
Root Administrator
Hi,

I've searched google and the forum but didn't find anything relevant (except a bug for Plesk migration).

I have a CPanel server (11.34.0 b9) into which I've migrated ~100 sites from Ensim servers (v. 10.3.6). In the last few days a problem occurs to sites migrated: Databases are not migrated automatically.
Moreover, on these new sites after migration, new databases created in CPanel by the account owners do not appear in their "Mysql Databases" CPanel frontend and creation of new DB users from CPanel fails. (But DBs still exist, work and are administered through PhpMyAdmin).

The Databases on remote servers are read fine, mysql user grants are read fine too ("enXim Grabbing mysql grants...Done"). Everything else seems fine in migrating, however, when trying to restore DBs:

--- Log Detail ---
Restoring MySQL databases....
Restoring database domain_com_data......
ERROR 1045 (28000): Access denied for user 'domainuser'@'localhost' (using password: YES) Restoration of MySQL database (domain_com_data) failed with error: Execution of /usr/bin/mysql --defaults-file=/home/domainuser/._.work.B7JRsZ2m_lP7nWC3 -B -A --force domain_com_data exited with value: 1
Saved to /home/domainuser/domain_com_data.1353978676
Done
Done
Restoring MySQL privs
Done
Reloading MySQL
Done
--- Log Detail End---

After that the import continues and finishes successfully.
("Transfer Complete - Account Copy Process Complete")

Now, I've read somewhere for db users not to exceed 16 characters and they do not.
There's lot of free disk space
There are no problems creating new DBs or DB users on the other accounts (previously imported).
MySQL general log only shows an entry "connect Access denied for user 'domainuser'@'localhost' (using password: YES)", after a few [email protected] successful connections.

On the last accounts (having this issue) sometimes the databases appear in CPanel, but there is an extra DB named "ERROR 1045 (28000): Access denied for user 'domainuser'@'localhost' (using password: YES)", as in Clipboard-1.jpg.
However, some other times no DB appears. If the account owner tries to delete the DB, all DBs disappear from his CPanel.

Some 100 sites were migrated fine in the last few months and continue to operate fine. But the last 12 sites appear to have this consistent issue.

Any thoughts?
 

bbrink68

Active Member
Nov 27, 2012
26
0
1
cPanel Access Level
DataCenter Provider
Re: From Ensim: ERROR 1045 (28000): Access denied for user [email protected]

That is interesting, I know this may sound stupid but have you tried re-granting root priviliges again?

Drop into a mysql prompt:
Code:
GRANT ALL PRIVILEGES on *.* to 'user'@'IP' IDENTIFIED BY '*UserPass*';
You should use the cPanel users creds here obviously...try using the IP instead of "localhost" as there could be some DNS problems resolving localhost into 127.0.0.1 or whatever yours is.

Worth a shot although that error in cPanel interface seems to be more concerning. This almost seems like a bug with cPanel and perhaps a forced update may be in order?

SSH into server:
Code:
/scripts/upcp --force
Probably the error is deeper than that but someone with a similar problem reported success with the following:
Code:
grant all on hibernate.* to 'testuser'@'%' identified by 'testuser';
grant all on hibernate.* to 'testuser'@'localhost' identified by 'testuser';
Good Luck!
 
Last edited:

antispam

Member
Nov 26, 2012
8
0
1
cPanel Access Level
Root Administrator
Re: From Ensim: ERROR 1045 (28000): Access denied for user [email protected]

Thanks bbring68,


> That is interesting, I know this may sound stupid but have you tried re-granting root priviliges again?
I have, nothing is solved.

>Drop into a mysql prompt:
Code:
GRANT ALL PRIVILEGES on *.* to 'user'@'IP' IDENTIFIED BY '*UserPass*';
That's not easy: The user [email protected] is created during the execution of CPanel Site Transfer Script. Right after creating the user, the script tries to restore the DB as [email protected] tries and fails.

>SSH into server:
Code:
/scripts/upcp --force
Tried, no luck.

Probably the error is deeper than that but someone with a similar problem reported success with the following:
Code:
grant all on hibernate.* to 'testuser'@'%' identified by 'testuser';
grant all on hibernate.* to 'testuser'@'localhost' identified by 'testuser';
Show Grants shows exactly this.

Another peculiar thing: There is an entry in mysql.Db with Database Name "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (u". Seriously, all that inside the double quotes is the DB name!!!
As root, I drop this database, it really disappears, but when a specific cpanel user goes to the "MySQL Databases" module in CPanel, this database is recreated. There is no such db in /var/lib/mysql, of course.

Ideas anyone?
 

SB-Nick

Well-Known Member
Aug 26, 2008
175
9
68
cPanel Access Level
Root Administrator
Re: From Ensim: ERROR 1045 (28000): Access denied for user [email protected]

Did you try querying mysql for all the mysql users on the mysql.user table and see if the usernames are being created properly? If database names are created but usernames are missing maybe cPanel isnt catching them correctly.