sinnbeck / laravel-served

Docker version of artisan serve (with alot more)
MIT License
74 stars 13 forks source link

Can't connect to mysql outside docker #11

Closed iammikek closed 4 years ago

iammikek commented 4 years ago

probably just me, but whats your normal process for interacting with the mysql DB?

I've tried to connect via the settings:

'mysql' => [
            'service' => 'mysql',
            'version' => '5.7',
            'port' => 3306,
            'root_password' => 'password',
            'database' => 'laravel',
            'username' => 'laravel',
            'password' => 'password',
        ],

both with localhost + 127.0.0.1 via the Database Tab in phpstorm. No dice. Any advice?

sinnbeck commented 4 years ago

Check if the container is running with php artisan served:list

It might be a port inflict. If so, try setting another port (eg 3307), and run php artisan served:up again. After this try connecting on this port in phpstorm (still 3306 in laravel)

sinnbeck commented 4 years ago

image image

sinnbeck commented 4 years ago

Any luck getting this to work? Sadly I don't own a Mac to test on

iammikek commented 4 years ago

yeah. I got it to work when I changed the port with config/served.php