'ee_mysql_grant_host' with Remote MySQL


#1

Hi Guys,

I have been struggling to fix this issue, and I did read all Topics that have the same issue but still can’t find the solution, and hope someone can help me with this.

I have a PerconaDB Cluster for MySQL, 3 Nodes with HAProxy as a load balancer, I followed the belwo topic to add the Remote MySQL:

but whenever I try to create a wordpress site I get this error:

ee : Oops Something went wrong !!

Calling cleanup actions …

ee : Calling cleanup actions …

‘ee_mysql_grant_host’

I can access MySQL server just by issuing mysql command without a password, and I have grant privilege to root@%,

here is the logs when i create a site:

root@mgngx1:~# ee site create testingmysql.com --wp 2016-05-26 17:08:59,114 (DEBUG) ee : logging initialized for ‘ee’ using LoggingLogHandler 2016-05-26 17:08:59,356 (DEBUG) ee : [’/usr/local/bin/ee’, ‘site’, ‘create’, ‘testingmysql.com’, ‘–wp’] 2016-05-26 17:08:59,357 (DEBUG) ee : collecting arguments/commands for <ee.cli.controllers.base.EEBaseController object at 0x7f11cd478c50> 2016-05-26 17:08:59,359 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteController object at 0x7f11cd478f28> 2016-05-26 17:08:59,361 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteCreateController object at 0x7f11cd482828> 2016-05-26 17:08:59,365 (INFO) ee : Initializing EasyEngine Database 2016-05-26 17:08:59,374 (DEBUG) ee : Setting apt_packages variable for Nginx 2016-05-26 17:09:00,831 (DEBUG) ee : Finding string SCRIPT_FILENAME to file /etc/nginx/fastcgi_params 2016-05-26 17:09:00,831 (DEBUG) ee : Setting apt_packages variable for PHP 2016-05-26 17:09:02,066 (DEBUG) ee : Setting apt_packages variable for MySQL 2016-05-26 17:09:02,066 (DEBUG) ee : Running command: mysqladmin ping 2016-05-26 17:09:02,147 (DEBUG) ee : Command Output: mysqld is alive , Command Error: 2016-05-26 17:09:02,147 (DEBUG) ee : Setting apt_packages variable for Postfix 2016-05-26 17:09:03,392 (DEBUG) ee : Setting packages variable for WP-CLI 2016-05-26 17:09:03,392 (DEBUG) ee : Running command: which wp 2016-05-26 17:09:03,398 (DEBUG) ee : Command Output: /usr/bin/wp , Command Error: Running pre-update checks, please wait… 2016-05-26 17:09:03,399 (INFO) ee : Running pre-update checks, please wait… 2016-05-26 17:09:03,399 (DEBUG) ee : checking NGINX configuration … 2016-05-26 17:09:03,436 (INFO) ee : Setting up NGINX configuration 2016-05-26 17:09:03,436 (DEBUG) ee : loading template file /usr/lib/ee/templates/virtualconf.mustache 2016-05-26 17:09:03,439 (DEBUG) ee : Checking generated nginx conf, please wait… Setting up NGINX configuration [Done] 2016-05-26 17:09:03,484 (INFO) ee : [Done] 2016-05-26 17:09:03,484 (DEBUG) ee : Creating Symbolic link, Source:/etc/nginx/sites-available/testingmysql.com, Dest:/etc/nginx/sites-enabled/testingmysql.com 2016-05-26 17:09:03,485 (INFO) ee : Setting up webroot 2016-05-26 17:09:03,485 (DEBUG) ee : Creating Symbolic link, Source:/var/log/nginx/testingmysql.com.access.log, Dest:/var/www/testingmysql.com/logs/access.log 2016-05-26 17:09:03,486 (DEBUG) ee : Creating Symbolic link, Source:/var/log/nginx/testingmysql.com.error.log, Dest:/var/www/testingmysql.com/logs/error.log Setting up webroot [Done] 2016-05-26 17:09:03,486 (INFO) ee : [Done] 2016-05-26 17:09:03,618 (INFO) ee : Downloading WordPress 2016-05-26 17:09:03,618 (DEBUG) ee : Changing directory to /var/www/testingmysql.com/htdocs/ 2016-05-26 17:09:03,618 (DEBUG) ee : Running command: wp --allow-root core download 2016-05-26 17:09:05,008 (DEBUG) ee : Command Output: Downloading WordPress 4.5.2 (en_US)… Using cached file ‘/root/.wp-cli/cache/core/wordpress-4.5.2-en_US.tar.gz’… Success: WordPress downloaded. , Command Error: Downloading WordPress [Done] 2016-05-26 17:09:05,009 (INFO) ee : [Done] Enter the MySQL database name [testingmysql_com]: Enter the MySQL database user name [testingmysql_com]: Enter the MySQL database password [fw0nkqEvNItBGKg]: 2016-05-26 17:09:12,585 (INFO) ee : Setting up database 2016-05-26 17:09:12,586 (DEBUG) ee : Creating database testingmysql_com 2016-05-26 17:09:12,587 (DEBUG) ee : [Error]Setting up database: ‘an integer is required (got type str)’ 2016-05-26 17:09:12,587 (DEBUG) ee : 2016-05-26 17:09:12,587 (DEBUG) ee : ‘MySQL Connectivity problem occured’ Setting up database Oops Something went wrong !! 2016-05-26 17:09:12,587 (INFO) ee : Oops Something went wrong !! Calling cleanup actions … 2016-05-26 17:09:12,587 (INFO) ee : Calling cleanup actions … ‘ee_mysql_grant_host’

cat /etc/mysql/conf.d/my.cnf

[client]

host = 172.16.120.20

port = 3307

user = root

password = rootpassword

cat /etc/ee/ee.conf | grep grant-host

grant-host = %

ee -v

EasyEngine v3.6.1

Copyright © 2016 rtCamp Solutions Pvt. Ltd.

ee stack status

Remote MySQL found, Unable to check MySQL service status

2016-05-26 17:20:01,491 (WARNING) ee : Remote MySQL found, Unable to check MySQL service status

HHVM is not installed

2016-05-26 17:20:03,936 (INFO) ee : HHVM is not installed

nginx : Running

2016-05-26 17:20:03,958 (INFO) ee : nginx : Running

php5.6-fpm: Running

2016-05-26 17:20:03,977 (INFO) ee : php5.6-fpm: Running

php7.0-fpm: Running

2016-05-26 17:20:03,994 (INFO) ee : php7.0-fpm: Running

postfix : Running

2016-05-26 17:20:04,024 (INFO) ee : postfix : Running


#2

I am getting the same error. Did you get a solution for this


#3

Have you check a solution offered here: Site create fails 'ee_mysql_grant_host', despite seemingly valid config

Could you check your

/etc/mysql/my.cnf

for following parameter

lc_messages = en_US


#4

Yes did not work for me


#5

Hi,

I haven’t got it working till now, no matter what I try or what config change I do I get the same error, I also looked all over the Community and made all suggested fixes but still didn’t work.

we really need this to be fixed a lot of people are complaining about it.

Best Regards


#6

Yes TheSkyHeart, this is really crazy and I cant figure out the problem cause I have another server where it works perfectly fine, I even copied all the configs from there dont know what the issue it.


#7

i removed the mysql package and reinstalled it ee stack purge --mysql ee stack install --mysql

then in /etc/mysql/mysql.cnf

i commented bind-address

it worked for me not sure if it will work for anyone else


#8

Hi Wenceslaus,

did you remove mysql package on Mysql Server or on the web engine? cause I’m using PerconaDB Cluster as Remote MySQL and I can’t issue that command cause I don’t use EE on Remote MySQL.


#9

Hi TheSkyHeart,

I removed them on the webserver as I use AWS RDS. The issue I dont know what it is but it came in randomely as I have another server which is an exact copy and everything work fine there without any issues.

Regards, Wenceslaus

PS. i also removed all the configs


#10

Hi,

really this issue is making me go crazy, I have tried Wenceslaus_Dsilva suggestion but still didn’t work,

I’m able to access all mysql cluster servers individually by just typing mysql in command line, but yet when I try to create a WP site with ee I get this error ‘ee_mysql_grant_host’.

is there a way to make ee show debugging info for mysql command?

please I really need help with this I have been trying to get to work since almost 3 months now.

Best Regards


#11

Hi again,

can someone please explain to me the below logs:

2016-08-12 17:09:18,490 (INFO) ee : Setting up database
2016-08-12 17:09:18,490 (DEBUG) ee : Creating database example_com
2016-08-12 17:09:18,491 (DEBUG) ee : [Error]Setting up database: 'an integer is required (got type str)'
2016-08-12 17:09:18,491 (DEBUG) ee :
2016-08-12 17:09:18,492 (DEBUG) ee : 'MySQL Connectivity problem occured'
Setting up database    		Oops Something went wrong !!
2016-08-12 17:09:18,492 (INFO) ee : Oops Something went wrong !!
Calling cleanup actions ...
2016-08-12 17:09:18,492 (INFO) ee : Calling cleanup actions ...
'ee_mysql_grant_host'

especially where it says

2016-08-12 17:09:18,491 (DEBUG) ee : [Error]Setting up database: 'an integer is required (got type str)'

Thanks


#12

Hi Guys,

seem’s no one is able to help, thanks anyway, going back to the manual way.

Best Regards


#13

Same problem here and all the confs are correct.


#14

@andremacola Check /etc/mysql/conf.d/my.cnf It should have only three parameters

# cat /etc/mysql/conf.d/my.cnf 
[client]
host=********
user=********
password=********

#15

The problem is not that. I always had this problem with easyengine configuring the my.cnf for mysql.

I recent discovered the problems was in the parameters:

skip-grant-tables
skip-networking
skip-external-locking
bind_address

My my.cnf now its:

#skip-grant-tables
#skip-networking
skip-external-locking
#bind_address

#16

Hi @andremacola

are you using a remote MySQL Server? are those Settings on the Server or Client?

did those changes fixed your problem? cause until now I couldn’t get EE to work with Remote MySQL.


#17

Yes, using remote mysql. Settings on the REMOTE MYSQL SERVER.


#18

For whatever reason, it was using some weak default password. I replaced it with a complex password that is connected to phpmyadmin and it fixed the error message when deleting / making a new site using the default EE command.


#19