Did you set your credentials in .env file?
Jun 6, 2020
10
Level 11
php artisan migrate ERROR
I am setting up a new macbook pro
php artisan migrate
returns the following ERROR
Illuminate\Database\QueryException
SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' (SQL: select * from information_schema.tables where table_schema = and table_name = migrations and table_type = 'BASE TABLE')
strange thing is that this command doesn't work
mysql -uroot -p
instead I have to use
sudo mysql -uroot -p
or just
mysql
once I am logged into mysql I create a database named "pool"
my .env looks like this
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pool
DB_USERNAME=root
DB_PASSWORD=
I found a lot of threads regarding this topic:
php artisan config:clear
php artisan cache:clear
php artisan config:cache
didn't help
I had maria DB installed
brew install maraiadb
and then i de installed it
now when I do
brew search mysql
I have mysql and [email protected] installed
these are my sql users
mysql> SELECT user, host FROM mysql.user;
+-------------+---------------------------+
| User | Host |
+-------------+---------------------------+
| | localhost |
| mariadb.sys | localhost |
| reniar | localhost |
| root | localhost |
| | reniars-macbook-pro.local |
+-------------+---------------------------+
5 rows in set (0.00 sec)
Please or to participate in this conversation.