Skip to content

Operation CREATE USER failed for 'domain_com'@'localhost' - ee doesn't check if it has req'd privileges? #120

@ghost

Description

Ubuntu 12.0.3 LTS and easyengine version: 1.1.3

I use CLI to login to mySQL and verify it has all privileges. Then I run the site create command:

Enter The MySQL Username [root]:
Enter The MySQL Password:
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'domain_com'@'localhost'
Setting Up WordPress, Please Wait...
[ Sat Feb 8 16:26:53 EST 2014 ] Unable To Create WordPress Tables For domain.com

When I try to delete the site with ee, the DB can't be dropped using "root".

ee site delete domain.com
WPDBNAME = domain.com
WPDBUSER = domain.com
MYSQLHOST = localhost
Are You Sure To Drop domain.com Database (y/n): y
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[ Sat Feb 8 16:28:13 EST 2014 ] Unable To Drop domain.com Database

But when I use:
mysql -u root -p -h localhost
.. I can use the DB and drop the DB that was created by ee.
It seems there's s something wrong in the way ee handles WP DB. Maybe it should first try to verify if it has necessary rights on the DB and exit if it doesn't.

What would be a workaround? Use a non-root user and give that user all privileges on the DB before ee starts creating the site?

Reference: similar issue that was closed is here:
#95

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions