[RESOLVED] 'ee_mysql_grant_host' Oops Something went wrong !! Calling cleanup actions ...
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 --wpand 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
- [x] ee -v
EasyEngine v3.7.4
Copyright (c) 2016 rtCamp Solutions Pvt. Ltd.
- [x] 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
- [x] 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!
While, I would still like to know what caused this issue. I do have resolved it be resetting the pass for root user. This tutorial — credits came in handy.
P.S. Make sure you do not use any characters in the new pass since ZSH started tripping on that.
@ahmadawais thanks for posting what worked for you.
Unfortunately, it's hard to find out why password got changed! :|
I had the same problem and this helped also. May have something to do with updating MySQL and choosing the provider package.
Hi I go the same issue and tried @ahmadawais 's advice but still no luck. Anyone can help? I am stuck. Thanks.
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
@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 https://github.com/EasyEngine/easyengine/issues/932 https://github.com/wp-cli/wp-cli/issues/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.
Hi @fxaviers I will give it a try. Thank you so much.
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.
Hi @fxaviers, thanks a lot, it did work for me :)
@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
@singlow thank you very much wp cli update --nightly --allow-root works for me ;)