I setup a new dev environment on WSL2 (Windows Subsystem for Linux) with Ubuntu 20.04.
A generic LAMP stack, Apache2, PHP 7.3, and MariaDB for the mysql server.
When I try to run
php artisan install
on my Laravel app, I get the following error
In Connection.php line 664:
SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' (SQL: select * from information_schema.tables where table_schema
= dev_database and table_name = default_migrations and table_type = 'BASE TABLE')
AND
SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'
I have entered the correct mysql password but not sure what this error means.
I suspect it might be a permission issue with folders or access to DB so I looked up the processes to see how MySQL is being run.
After I run ps aux
, I get the following (not sure if this is related but I have 3 proccesses for DB)
root 24328 0.0 0.0 2612 1872 pts/1 S Aug30 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 24445 0.0 1.3 1775800 88096 pts/1 Sl Aug30 0:03 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=
root 24446 0.0 0.0 9720 1000 pts/1 S Aug30 0:00 logger -t mysqld -p daemon error