0

I'm building a Laravel project and I've been trying for the past week to connect to MYSQL through Sequel Pro. I've tried tens of different combinations of host, username and password, to no avail.

I have tried using localhost instead of 127.0.0.1 this also doesn't work.

Here are the details I'm trying to connect in Sequel Pro: connection details

I'm getting this error:

MySQL said: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/lib/plugin/caching_sha2_password.so, 2): image not found

I have checked that the port is being listened to, by running: netstat -ap tcp | grep -i "listen" which returned:

netstat -ap tcp | grep -i "listen" response

I have also checked that MYSQL is running in the Activity Monitor and mysqld process is running.

config/database.php

    'mysql' => [
        'driver' => 'mysql',
        'host' => env('DB_HOST', '127.0.0.1'),
        'port' => env('DB_PORT', '3306'),
        'database' => env('DB_DATABASE', 'homestead'),
        'username' => env('DB_USERNAME', 'homestead'),
        'password' => env('DB_PASSWORD', 'secret'),
        'unix_socket' => env('DB_SOCKET', ''),
        'charset' => 'utf8mb4',
        'collation' => 'utf8mb4_unicode_ci',
        'prefix' => '',
        'strict' => true,
        'engine' => null,
    ],

.env

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

So my question is: what am I doing wrong and why can't I connect to the database?

Thank you for any help.

Professor Abronsius
  • 33,063
  • 5
  • 32
  • 46
bob
  • 466
  • 1
  • 7
  • 27
  • Are Laravel and MySQL on Homestead? – user2094178 Jul 29 '18 at 19:03
  • @user2094178 No, I'm just using `php artisan serve`. Obviously, I have virtual box and vagrant installed though – bob Jul 29 '18 at 19:04
  • 1
    Do you have an instance of MySQL running on OS X also? – Brian Lee Jul 29 '18 at 19:19
  • @DigitalDrifter I downloaded MSQL, Initialised the database and started the MSQL server, if that's what you mean – bob Jul 29 '18 at 19:24
  • @DigitalDrifter Am I doing something wrong? – bob Jul 30 '18 at 15:45
  • `php artisan serve` is not starting application on vagrant system. It runs on your host OS. – Tpojka Aug 14 '18 at 14:02
  • After confirming that you can connect to MySQL through terminal AFTER you are logged in to `vagrant up` (should be `mysql -u homestead -p homestead#secret when asked`) then you should start connecting with various clients (i.e. Sequel Pro) – Tpojka Aug 14 '18 at 14:59

0 Answers0