msg: Failed to find required executable mysql

Hi

I am importing an SQL file into my already created DB but getting the above error:

  • name: import database
    mysql_db: name=DB state=import target=DB.sql login_user=root login_host=localhost login_unix_socket=/var/lib/mysql/tmp/mysqld login_password=‘’

Error:
msg: Failed to find required executable mysql

When I run this again it is fine and imports correctly. Anybody else been having this issue please?

Thanks

Hi Marti, can you share any details about how the mysql binary was installed? Was it via a tar or package? I’m very curious as to why it would fail in one instance but not when re-run.

Hi James,

it’s via tar, specifically this version: mysql-5.6.19-linux-glibc2.5-x86_64.tar.gz.

Hi,

We are facing similar issue. The only difference being this error occurs at all times. Also to mention we are running this playbook on an AWS instance. On other servers and VM’s it has worked before.
Any help would be appriciated.

Thanks in advance,
Mona