Migrating remote mysql to local not working

Alright so this does not appear to be working correctly with latest 3.4 of EE.

Firstly my remote mysql is just fine. I have existing sites and would like to migrate db to a new local mysql.

sudo ee stack status shows: MySQL is not installed HHVM is not installed nginx : Running php5-fpm : Running postfix : Running

sudo ee stack install --mysql produces MySQL connection is already alive

I have reverted /etc/mysql/conf.d/my.cnf to defaults i.e. no [host] entry.

So now looking for a nice ee way to put mysql on the localhost.

There’s definitely NO mysql running on localhost although sudo ee info produces: MySQL (5.5.47) on localhost:

port 3306 wait_timeout 300 interactive_timeout 28800 max_used_connections 37 datadir /var/lib/mysql/ socket /var/run/mysqld/mysqld.sock

I assume something in the ee script is confused.

check at /root/ folder for my.cnf file .

There’s no my.cnf file there

Try running:

mysqladmin -umysql ping

…and look for a “MySQL is alive” type reply, if MySQL is installed and running. If there is no “ALIVE” message, it probably isn’t.

You can also try:

mysqladmin -u root -p status

…and look for output similar to:

Enter password:
Uptime: 4  Threads: 1  Questions: 62  Slow queries: 0  Opens: 51

…which means MySQL is already installed and running. If it looks more like:

mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

…it probably isn’t installed/running.

FYI - - - - -

If your server is running on Debian, type:

/etc/init.d/mysql status

If your server is running Redhat/Fedora, type:

service mysql status

…or…

/etc/init.d/mysqld status

All this, because It’s my understanding there should be a service running, but the client may not be installed. Basically, need to reverse the effects of this setup: https://easyengine.io/docs/remote-mysql/

Thanks but I don’t think you understood the issue. I’m 100% certain mysql isn’t running locally. I know I can install it outside of ee, I’m wondering why ee is not able to do this automatically.

I must have misunderstood, but if you are using a remote MySQL database doesn’t the MySQLservice already have to be running on the local server (I think mysqld )?

Does /etc/init.d/mysql exist?

No, mysql daemon doesn’t run on a server that doesn’t have mysql installed. mysql client is what’s needed to connect to remote instances of mysql.

Issue is that the ee script is throwing an error MySQL connection is already alive when I attempt to install the mysql stack yet ee status is showing that mysql is NOT installed. So there’s a bug in there. And yes I’ve shut down all services but error still shows so it’s obviously checking some condition somewhere.

try ee stack install --mysql

and post the log from /var/log/ee/ee.log