Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RESOLVED] 'ee_mysql_grant_host' Oops Something went wrong !! Calling cleanup actions ... #775

Closed
ahmadawais opened this Issue Oct 3, 2016 · 11 comments

Comments

Projects
None yet
9 participants
@ahmadawais
Copy link
Contributor

commented Oct 3, 2016

I am getting 'ee_mysql_grant_host' error. I have gone through every issue similar to mine and was unable to fix it.

What's Happened?

  • Everything was working fine.
  • I was creating a new site ee site create xyz --wp and looks like MySQL is not accessible anymore.
  • I am trying to fix it and also trying to understand what caused this issue.

If I run mysql command this is what I get

$ mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

If I enter the root mysql pass as mentioned in the st /etc/mysql/conf.d/my.cnf I still get the same response

$ mysql -u root -p XXXX
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Why did this happen? What should I do?

Sepcs

  • [X ] lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:    16.04
Codename:   xenial
  • ee -v
EasyEngine v3.7.4
Copyright (c) 2016 rtCamp Solutions Pvt. Ltd.
  • ee info
NGINX (1.10.0):

user                             www-data
worker_processes                 auto
worker_connections               4096
keepalive_timeout                30
fastcgi_read_timeout             300
client_max_body_size             100m
allow                            127.0.0.1

PHP (5.6.26-1):

user
expose_php                       Off
memory_limit                     128M
post_max_size                    100M
upload_max_filesize              100M
max_execution_time               300

Information about www.conf
ping.path                        /ping
pm.status_path                   /status
process_manager                  ondemand
pm.max_requests                  500
pm.max_children                  100
pm.start_servers                 20
pm.min_spare_servers             10
pm.max_spare_servers             30
request_terminate_timeout        300
xdebug.profiler_enable_trigger   off
listen                           127.0.0.1:9000

Information about debug.conf
ping.path                        /ping
pm.status_path                   /status
process_manager                  ondemand
pm.max_requests                  500
pm.max_children                  100
pm.start_servers                 20
pm.min_spare_servers             10
pm.max_spare_servers             30
request_terminate_timeout        300
xdebug.profiler_enable_trigger   on
listen                           127.0.0.1:9001
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

MySQL (10.1.18-MariaDB) on localhost:

port
wait_timeout
interactive_timeout
max_used_connections
datadir
socket
my.cnf [PATH]                    /etc/mysql/conf.d/my.cnf
  • wp --allow-root --info
PHP binary: /usr/bin/php5.6
PHP version:    5.6.26-1+deb.sury.org~xenial+1
php.ini used:   /etc/php/5.6/cli/php.ini
WP-CLI root dir:    phar://wp-cli.phar
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 0.24.1

What have I done?

There are similar issues. #688, forum thread, second and this one which is still inresolved.

EE Custom Config looks like
/etc/ee/ee.conf

[mysql]

### MySQL database grant host name
grant-host = localhost

### Ask for MySQL db name while site creation
db-name = true

### Ask for MySQL user name while site creation
db-user = true

*MySQL Config has lc_messages parameter *
/etc/mysql/my.cnf

#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket      = /var/run/mysqld/mysqld.sock
port        = 3306
basedir     = /usr
datadir     = /var/lib/mysql
tmpdir      = /tmp
lc_messages_dir = /usr/share/mysql
lc_messages = en_US
skip-external-locking

Tailing the log

2016-10-03 19:00:34,464 (DEBUG) ee : Running command: mysqladmin ping
2016-10-03 19:00:34,474 (DEBUG) ee : Command Output: ,
Command Error: mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

2016-10-03 19:00:34,542 (DEBUG) ee : loading template file /usr/lib/ee/templates/info_mysql.mustache

I am currently thinking of reseting the mysql pass but why did this happen?
Looking forward!

@ahmadawais ahmadawais changed the title 'ee_mysql_grant_host' Oops Something went wrong !! Calling cleanup actions ... [RESOLVED] 'ee_mysql_grant_host' Oops Something went wrong !! Calling cleanup actions ... Oct 3, 2016

@ahmadawais

This comment has been minimized.

Copy link
Contributor Author

commented Oct 3, 2016

While, I would still like to know what caused this issue. I do have resolved it be resetting the pass for root user. This tutorialcredits came in handy.

P.S. Make sure you do not use any characters in the new pass since ZSH started tripping on that.

@ahmadawais ahmadawais closed this Oct 3, 2016

@rahul286

This comment has been minimized.

Copy link
Member

commented Oct 4, 2016

@ahmadawais thanks for posting what worked for you.

Unfortunately, it's hard to find out why password got changed! :|

@robwilde

This comment has been minimized.

Copy link

commented Jan 6, 2017

I had the same problem and this helped also. May have something to do with updating MySQL and choosing the provider package.

@robert1112

This comment has been minimized.

Copy link

commented Sep 21, 2017

Hi I go the same issue and tried @ahmadawais 's advice but still no luck. Anyone can help? I am stuck. Thanks.

@fxaviers

This comment has been minimized.

Copy link

commented Sep 21, 2017

I have the same problem. Resetting the MySQL password did not work.

Additional Information:
$ mysqladmin ping
mysqld is alive

ee info

NGINX (1.10.3):

user                             www-data
worker_processes                 auto
worker_connections               4096
keepalive_timeout                30
fastcgi_read_timeout             300
client_max_body_size             100m
allow                            127.0.0.1

PHP (5.6.31-4):

user
expose_php                       Off
memory_limit                     128M
post_max_size                    100M
upload_max_filesize              100M
max_execution_time               30

Information about www.conf
ping.path                        /ping
pm.status_path                   /status
process_manager                  ondemand
pm.max_requests                  500
pm.max_children                  10
pm.start_servers                 20
pm.min_spare_servers             10
pm.max_spare_servers             30
request_terminate_timeout        300
xdebug.profiler_enable_trigger   off
listen                           127.0.0.1:9000

Information about debug.conf
ping.path                        /ping
pm.status_path                   /status
process_manager                  ondemand
pm.max_requests                  500
pm.max_children                  100
pm.start_servers                 20
pm.min_spare_servers             10
pm.max_spare_servers             30
request_terminate_timeout        300
xdebug.profiler_enable_trigger   on
listen                           127.0.0.1:9001

MySQL (10.0.32-MariaDB) on localhost:

port                             3306
wait_timeout                     600
interactive_timeout              28800
max_used_connections             1
datadir                          /var/lib/mysql/
socket                           /var/run/mysqld/mysqld.sock
my.cnf [PATH]                    /etc/mysql/conf.d/my.cnf
@fxaviers

This comment has been minimized.

Copy link

commented Sep 21, 2017

@robert1112 I found what is causing the error and also a way to fix it temporarily:

Error:
Basically, what causes this is a decompression failure of WP 4.8.2 en_US
#932
wp-cli/wp-cli#4370

Solution:
Download the file wordpress-4.8.2-pt_BR.tar.gz (Or other than the en_US), rename to en_US and upload to /root/.wp-cli/cache/core

I know that there may be a simpler, or even more correct, way of doing this, but I do not have the necessary knowledge to do so.

@robert1112

This comment has been minimized.

Copy link

commented Sep 21, 2017

Hi @fxaviers I will give it a try. Thank you so much.

@singlow

This comment has been minimized.

Copy link

commented Sep 21, 2017

You can also install wp-cli nightly (wp cli update --nightly). It has added a fallback to use the system tar/gzip commands if it fails in decompressing the downloaded wordpress targzip file. The wordpress archive may have something wrong, but it decompresses fine with other gzip tools, just not php.

@nfsarmento

This comment has been minimized.

Copy link

commented Sep 21, 2017

Hi @fxaviers, thanks a lot, it did work for me :)

@kieusonlam kieusonlam referenced this issue Sep 22, 2017

Closed

Cannot create new wordpress site #932

4 of 4 tasks complete
@dejioke

This comment has been minimized.

Copy link

commented Sep 27, 2017

@fxaviers method works.
However, it might be an extra task to download and reupload a new version of of wordpres.
If you have installed a site before on that Easy Engine installation, you will see all the previous versions of wordpress that worked fine at /root/.wp-cli/cache/core.
rename one of them to wordpress-4.8.2-en_US.tar.gz and retry creating site.

NOTE: This way easy engine will install earlier version of wordpress that you renamed, you can update it to the latest via WP dashboard

@emanuellimeira

This comment has been minimized.

Copy link

commented Oct 29, 2017

@singlow thank you very much wp cli update --nightly --allow-root works for me ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.