MySQL login, and why does migrate say connection refused?

346 views 2 posts

Member

Stack shows MySQL green, phpMyAdmin opens. Laravel .env is the tutorial default: 127.0.0.1:3306, root/root — artisan migrate: connection refused. What is going on?

MacFullStack

The stack is up — the connection string does not match. Copy it from the Stack tab, not from a random README.

Default local accounts:

  • user macstack / password macstack
  • root / root
  • host from the Mac: 127.0.0.1 (not a localhost socket if PHP expects TCP)

Read the port on Stack — do not assume 3306; Settings → Ports may have changed it.

In Docker mode, from the web container the host is often mysql, not 127.0.0.1.

PostgreSQL is a Pro service: same macstack/macstack, port on Stack (usually 5432). One Laravel on MySQL is an evening on Free.

Help: /help/credentials-ports.

Reply

Sign in to create topics and reply.

Download Pro Teams