Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: windows mysql install fails #1221

Closed
WizarDave opened this issue Dec 30, 2024 · 3 comments
Closed

[Bug]: windows mysql install fails #1221

WizarDave opened this issue Dec 30, 2024 · 3 comments

Comments

@WizarDave
Copy link

Platform

Windows

Operating system version

Windows 11

System architecture

Windows

Herd Version

1.13.0

PHP Version

PHP 8.3

Bug description

Fresh install of Herd. Create my first laravel site. MySQL connection fails. SQLite seems to work.

` ✓ 53 modules transformed.
rendering chunks...
computing gzip size...
public/build/manifest.json 0.27 kB │ gzip: 0.15 kB
public/build/assets/app-C5xzoV4S.css 55.07 kB │ gzip: 9.18 kB
public/build/assets/app-Xaw6OIO1.js 34.85 kB │ gzip: 14.03 kB
✓ built in 14.15s

Illuminate\Database\QueryException

SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it (Connection: mysql, SQL: select exists (select 1 from information_schema.tables where table_schema = 'ei' and table_name = 'migrations' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED')) as exists)

at vendor\laravel\framework\src\Illuminate\Database\Connection.php:825
821▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
822▕ );
823▕ }
824▕
➜ 825▕ throw new QueryException(
826▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
827▕ );
828▕ }
829▕ }

1 vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:66
PDOException::("SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it")

2 vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:66
PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=ei", "root", Object(SensitiveParameterValue), [])

INFO Livewire scaffolding installed successfully.`

Steps to reproduce

On Windows 11

  • Install Herd
  • From Powershell (administrator): laravel new ei
  • The error is received during install.

Relevant log output

No response

@mpociot
Copy link
Member

mpociot commented Jan 6, 2025

@WizarDave are you using Herd Pro?
Herd Pro allows you to create and start database services like MySQL, Redis, etc.

@mpociot mpociot added the needs more information Further information is requested label Jan 6, 2025
@WizarDave
Copy link
Author

This was from the Laravel installer. I expected it to ask for the mysql credentials, like other installers I've used, but it doesn't so it throws the error. Probably just an oversight on the installer programmers. ???
I've used Herd, but only with SQLite since I don't have any other options without upgrading to PRO. That installs without problems.

@github-actions github-actions bot removed the needs more information Further information is requested label Jan 6, 2025
@mpociot
Copy link
Member

mpociot commented Jan 7, 2025

Ah okay, then the error is coming from Laravel trying to connect to a non-existing database server instance and it's unrelated to Herd itself.
Either switch to SQLite or setup a MySQL server locally to fix this.

@mpociot mpociot closed this as completed Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants