Site create fails 'ee_mysql_grant_host', despite seemingly valid config

Hi,

I’m trying to run the following statement: ee site create sier.groenstegras.nl --wpfc

Command output:

Running pre-update checks, please wait... 
Setting up NGINX configuration 	[Done]
Setting up webroot 		[Done]
Downloading Wordpress 		[Done]
Setting up database		Oops Something went wrong !!
Calling cleanup actions ...
'ee_mysql_grant_host'

Log file:

2015-10-13 20:49:52,221 (INFO) ee : ^[[94mRunning pre-update checks, please wait...^[[0m
2015-10-13 20:49:52,221 (DEBUG) ee : ^[[95mchecking NGINX configuration ...^[[0m
2015-10-13 20:49:52,266 (INFO) ee : ^[[94mSetting up NGINX configuration        ^[[0m
2015-10-13 20:49:52,266 (DEBUG) ee : loading template file /usr/lib/ee/templates/virtualconf.mustache
2015-10-13 20:49:52,268 (DEBUG) ee : ^[[95mChecking generated nginx conf, please wait...^[[0m
2015-10-13 20:49:52,313 (INFO) ee : ^[[94m[^[[0mDone^[[94m]^[[0m
2015-10-13 20:49:52,313 (DEBUG) ee : ^[[95mCreating Symbolic link, Source:/etc/nginx/sites-available/sier.groenstegras.$
2015-10-13 20:49:52,313 (INFO) ee : ^[[94mSetting up webroot            ^[[0m
2015-10-13 20:49:52,313 (DEBUG) ee : ^[[95mCreating Symbolic link, Source:/var/log/nginx/sier.groenstegras.nl.access.lo$
2015-10-13 20:49:52,314 (DEBUG) ee : ^[[95mCreating Symbolic link, Source:/var/log/nginx/sier.groenstegras.nl.error.log$
2015-10-13 20:49:52,314 (INFO) ee : ^[[94m[^[[0mDone^[[94m]^[[0m
2015-10-13 20:49:52,371 (INFO) ee : ^[[94mDownloading Wordpress                 ^[[0m
2015-10-13 20:49:52,371 (DEBUG) ee : ^[[95mChanging directory to /var/www/sier.groenstegras.nl/htdocs/^[[0m
2015-10-13 20:49:52,371 (DEBUG) ee : ^[[95mRunning command: wp --allow-root core download^[[0m
2015-10-13 20:49:53,587 (INFO) ee : ^[[94m[^[[0mDone^[[94m]^[[0m
2015-10-13 20:49:53,588 (DEBUG) ee : ^[[95mAutofix MySQL username (ERROR 1470 (HY000)), please wait^[[0m
2015-10-13 20:49:53,588 (INFO) ee : ^[[94mSetting up database           ^[[0m
2015-10-13 20:49:53,588 (DEBUG) ee : ^[[95mCreating database sier_groenstegras_nl^[[0m
2015-10-13 20:49:53,590 (DEBUG) ee : ^[[95m^[[0m
2015-10-13 20:49:53,590 (DEBUG) ee : ^[[95m'MySQL Connectivity problem occured'^[[0m
2015-10-13 20:49:53,591 (INFO) ee : ^[[94m^[[91mOops Something went wrong !!^[[0m
2015-10-13 20:49:53,591 (INFO) ee : ^[[94m^[[91mCalling cleanup actions ...^[[0m

Further analysis:

  1. /etc/mysql/conf.d/my.cnf exists and contains valid information

  2. mysql command can be invoked and runs fine

  3. root@localhost exists, identified by password and has all privileges

    mysql> SELECT USER(),CURRENT_USER(); ±---------------±---------------+ | USER() | CURRENT_USER() | ±---------------±---------------+ | root@localhost | root@localhost | ±---------------±---------------+

    1 row in set (0.00 sec)


 Grants for root@localhost                                                                                                                        |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD     '*//////removed////' WITH GRANT OPTION |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION                                                                               |
+----------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

Any help would be much appreciated!

1 Like

Hello @mrterhorst

Could you please provide output of the following command:

cat /etc/ee/ee.conf

Thanks for your reply. Here it is. I’ve tried: localhost, ‘localhost’, “localhost”, 127.0.0.1 and ::1 as values for mysql-grant-host

# EasyEngine Configuration
#
# All commented values are the application default
#

[ee]

### Toggle application level debug (does not toggle framework debugging)
debug = true

### Where external (third-party) plugins are loaded from
# plugin_dir = /var/lib/ee/plugins/

### Where all plugin configurations are loaded from
# plugin_config_dir = /etc/ee/plugins.d/

### Where external templates are loaded from
# template_dir = /var/lib/ee/templates/

[log.logging]

### Where the log file lives (no log file by default)
file = /var/log/ee/ee.log

### The level for which to log.  One of: info, warn, error, fatal, debug
level = debug

### Whether or not to log to console
to_console = True

### Whether or not to rotate the log file when it reaches `max_bytes`
rotate = true

### Max size in bytes that a log file can grow until it is rotated.
max_bytes = 512000

The maximun number of log files to maintain when rotating

max_files = 7

[stack]

IP address that will be used in Nginx configurations while installing

ip-address = 127.0.0.1

[mysql]

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

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

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

[wordpress]

### Ask for WordPress prefix while site creation
prefix = False

### User name for WordPress sites
user = 

### Password for WordPress sites
password =

### EMail for WordPress sites
email =

[update]

### If enabled, load a plugin named `update` either from the Python module
### `ee.cli.plugins.example` or from the file path
### `/var/lib/ee/plugins/example.py`
enable_plugin = true

[sync]
### If enabled, load a plugin named `update` either from the Python module
### `ee.cli.plugins.example` or from the file path
### `/var/lib/ee/plugins/example.py`
enable_plugin = true

Thanks for your help!

Hello @mrterhorst

Could you check your

/etc/mysql/my.cnf

for following parameter

lc_messages = en_US

refer Creating site via ee results in MYSQL db connectivity error

Hi Prabuddha,

I’ve seen that one. The config directive was not present in the my.cnf file, so I added it manually. Restarted Mysql afterwards.

Unfortunately that doesn’t help.

Also tried lc-messages = en_US (with a dash instead of underscore), as the other directive about lc-messages has a dash.

[mysqld]
#
# * 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

This is exactly what I am currently experiencing and I have followed each step exactly with no success. is there any insight into what the ‘ee_mysql_grant_host’ is referring to?

hey everyone,

I have had the same issue and It has been fixed after updating ee sudo ee update

same issue suddenly developed it was working fine earlier. any solution? update did not solve it.

1 Like

Not sure if it has anything to do with installing new relic but running latest ee build and running into this error as well. Also suddenly developed as I just built 2 sites prior to setting up the monitoring.

Oh well, the manual way it is for now.

Thanks buddy, after updating and restarting the stack it worked for me.