Remote myql for EasyEngine


#1

I have a little problem testing a setup. I created two droplets on DigitalOcean, one for PHP,Nginx, utils, mysql client and more, and the other droplet specially for percona server. both droplets have private network ips. I setup percona server to run on the private network ip, i put the permissions for root, everything worked OK. I tried to connect manually with mysql -u root -p from the first server and it connected. I even modified ee.conf with the remote ip.

when i’m trying to create a website gives me this error: root@devly:/etc/easyengine# ee site create devly.co --wpfc Creating devly.co, please wait… Creating symbolic link for devly.co Creating htdocs & logs directory Downloading WordPress, please wait… Setting up WordPress, please wait… [ Wed Oct 15 05:19:49 EDT 2014 ] Unable to create WordPress tables for devly.co, exit status = 1 root@devly:/etc/easyengine#

in EE log I find:

Success: WordPress downloaded. EE_DB_NAME = devly_co EE_DB_USER = devly_co EE_DB_PASS = CE2oQT0OddBAGzt EE_MYSQL_HOST = 10.133.243.36 EE_MYSQL_GRANT_HOST = 10.133.243.36 EE_WP_PREFIX = wp_ EE_WP_USER = Alex EE_WP_PASS = ofP0zSckBLGPxFm EE_WP_EMAIL = alex@blajan.org ^[[34mSetting up WordPress, please wait…^[(B^[[m Error:

Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect $

  • Are you sure you have the correct username and password?
  • Are you sure that you have typed the correct hostname?
  • Are you sure that the database server is running?

If you're unsure what these terms mean you should probably contact your host. If you still need help you can alway$

[ Wed Oct 15 05:19:49 EDT 2014 ] ^[[31mUnable to create WordPress tables for devly.co, exit status = 1^[(B^[[m

on the db server the permissions are: grant all privileges on . to ‘root’@‘nginx-server-ip’ IDENTIFIED BY ‘REMOTE_MySQL_PASSWORD’ with grant option; flush privileges;

What’s wrong in my setup?


#2

@alexblajan

Hi Please confirm that you have .my.cnf file at your EasyEngine installed server. If not use this link for remote mysql setup with EasyEngine. Read here


#3

Hi there, so let me explain.

first server that I have installed everything beside mysql server has the private ip 10.133.244.194. The second server where I installed mysql server has the private ip: 10.133.243.36

Where I installed the stack without mysql I have edited .my.cnf from root: root@devly:~# cat .my.cnf [client] host=10.133.243.36 user=root password=*********** root@devly:~#

the EE conf on the stack is:

EasyEngine (ee) configuration file

[stack] apt-get-assume-yes = true gpg-key-fix = true ip-address =

[mysql] grant-host = 10.133.243.36 db-name = false db-user = false

[wordpress] prefix = false user = password = email =

Now on the DB server

my.cnf: root@db:~# cat .my.cnf [client] user=root password=******** root@db:~#

EE config:

EasyEngine (ee) configuration file

[stack] apt-get-assume-yes = true gpg-key-fix = false ip-address =

[mysql] grant-host = 10.133.243.36 db-name = false db-user = false

[wordpress] prefix = false user = password = email =

Now the mysql server config: bind-address = 10.133.243.36

What did I do wrong?


#4

LATER EDIT: I did some check with mysql_client_test: root@devly:~# mysql_client_test

##################################### client_connect
#####################################

Establishing a connection to ‘10.133.243.36’ …OK Connected to MySQL server version: 5.6.21-69.0 (50621)

Creating a test database ‘client_test_db’ …/build/buildd/mysql-5.5-5.5.38/tests/mysql_client_fw.c:267: check failed: ‘row’ root@devly:~# mysql_client_test

##################################### client_connect
#####################################

Establishing a connection to ‘10.133.243.36’ …OK Connected to MySQL server version: 5.6.21-69.0 (50621)

Creating a test database ‘client_test_db’ …/build/buildd/mysql-5.5-5.5.38/tests/mysql_client_fw.c:267: check failed: ‘row’


#5

LATER LATER EDIT: I think I know what’s the problem. So I tried to create a database from remote. Doesn’t let me. I went to the server, and I hit show grants; There It shows only root@localhost. I tried to add root@ip but gives me this error: mysql> GRANT ALL PRIVILEGES ON . TO ‘root’@‘10.133.244.194’ -> IDENTIFIED BY ‘******’ -> WITH GRANT OPTION; ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect… Connection id: 44 Current database: *** NONE ***

If I hit show grants; from remote gives me:

mysql> show grants; ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect… Connection id: 48 Current database: *** NONE ***

±--------------------------------------------------------------------------------------------------------------------------------------------+ | Grants for root@10.133.244.194 | ±--------------------------------------------------------------------------------------------------------------------------------------------+ | GRANT ALL PRIVILEGES ON . TO ‘root’@‘10.133.244.194’ IDENTIFIED BY PASSWORD ‘*72B5D04046349C70221964E018039F68BFA306E7’ WITH GRANT OPTION | ±--------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)

mysql>


#6

can you confirm that above command executed successfully on your mysql server.??


#7

Hello @alexblajan

It’s been a long time, and we haven’t heard from you. It looks like your issue is resolved.

I am closing this support topic for now. Feel free to create a new support topic if you have any queries further. :slight_smile:


#8