FreeBSD installation: mysql error

Hi guys,

I installed invoice ninja on FreeBSD.
But there is a step that tries to connect to the database, and occur the error:

Error Output:                                                                
================                                                             
sh: mysql: not found

The mysql is installed in FreeBSD and is in system path.
The problem (as I can see), invoice ninja installation is trying to locate mysql binary in paths: [‘/usr/sbin’, ‘/usr/bin’, ‘/sbin’, ‘/bin’].

But default binary path in FreeBSD is /usr/local/bin/

It is possible to add this absolute path to find binary on the system?

To temporary solve the problem, I created mysql symbolic link in /usr/bin/ and the installation goes successfully.

Thanks!

Hi,

This the database config file but I’m not sure if there’s a way to override the path.

Hi @hillel

Thanks for your reply, but I don’t know if it this location.

The installation have a test database connection button, that I think call this database.php you mentioned, that uses php-mysql driver. And this connection worked fine, is successfully.

The next installation step after “next”, the application tries to execute a command inside the host, that I think app should run mysql from that PATH.

The command is:

"mysql  --user="${:LARAVEL_LOAD_USER}" --password="${:LARAVEL_LOAD_PASSWORD}" --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}  " --database="${:LARAVEL_LOAD_DATABASE}" < "${:LARAVEL_LOAD_PATH}""

This not uses the php mysql driver. It seems a command executed on the host to load database tables to mysql database.

@david do you have any thoughts?

You’ll want to install mysql-client

@david

Thanks, but mysql-client is already installed on the host.

On FreeBSD, mysql (and all other non-basesystem binaries) are installed in /usr/local/bin, not /usr/bin/ (default on Linux).

As workaround, I created a mysql symlink to /usr/bin ($ ln -s /usr/local/bin/mysql /usr/bin/mysql)

But if there is a possibility to include /usr/local/bin as part of the PATH that would be great.