welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 165 forks source link

Wordmove Doctor shows errors for socket connection with Local (Flywheel) #609

Closed electricarts closed 4 years ago

electricarts commented 4 years ago

I have problems with the connection to the DB via socket. The movefile section looks like this:

database:
    name: "local"
    user: "root"
    password: "root"
    host: "localhost"
    mysqldump_options:  '--socket "/Users/mario/Library/Application\ Support/Local/run/Q7jGqXSBC/mysql/mysqld.sock"'
    mysql_options:  '--socket "/Users/mario/Library/Application\ Support/Local/run/Q7jGqXSBC/mysql/mysqld.sock"'

The Doctor says:

❌  error | [/database/mysql_options] key 'mysql_options:' is undefined.

✅  success | `mysql` command is in $PATH

✅  success | `mysqldump` command is in $PATH

❌  error |   We can't connect to the MySQL server using credentials
                specified in the Movefile. Double check them or try
                to debug your system configuration.

                The command used to test was:

                mysql --host=localhost --user=root --password=root -e'QUIT'

❌  error |   We can't connect to the database using credentials
                specified in the Movefile, or the database does not
                exists. Double check them or try to debug your
                system configuration.

                The command used to test was:

                mysql --host=localhost --user=root --password=root local -e'QUIT'

I have no idea where else to look. Any idea what I did wrong or what I should change?

macOS 10.15.6 Ruby 2.7.1 Wordmove 5.1.0 Local 5.6.10

electricarts commented 4 years ago

The test command receives the following response:

mario@BigMac public % mysql --host=localhost --user=root --password=root local -e'QUIT'
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

This path to the socket file is wrong. What and where do I have to change it?

alessandro-fazzi commented 4 years ago

Hi,

This is a duplicate of #572 . Thanks for the report, but please let’s keep just a single issue open. 🙂🙏

alessandro-fazzi commented 4 years ago

As I said in the other issue: this is not a wordmove problem, but only related to ‘doctor’ command