Skip to content

[Bug]: mysql command not found #677

@saschagysel

Description

@saschagysel

Platform

Windows

Operating system version

Windows 11

System architecture

Windows

Herd Version

1.1.0

PHP Version

No response

Bug description

I installed a fresh installation of Laravel Herd for Windows and enabled Pro features. Then I installed the MySQL service with the standard settings and I checked with TablePlus whether the server is working correctly (everything ok). In my projects terminal (in the PowerShell or PHPStorm) when I try to run php artisan migrate for the first time I am getting an error that the command mysql was not found.

According to the documentation (https://herd.laravel.com/docs/1/herd-pro-services/mysql#connecting-via-cli) Herd symlinks MySQL. I suspect that Herd did not create the environment variable / symlink correctly for MySQL and therefore PowerShell does not recognize the command.

Is there a way / command to manually create the environment variable / symlink?

I also tried to run Herd "As an administrator" and re-create the database service in hope that the environment variable will be created but it did not solve the problem.

An additional button in the mySQL section of Herd to create the variable would be helpful in this case.

Steps to reproduce

No response

Relevant log output

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

Error Output:
================
'mysql' is not recognized as an internal or external command,
operable program or batch file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions