Database Migration Failure
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Database Migration Failure
Hi guys, I get this exception every time I migrate the DB
Illuminate\Database\QueryException : SQLSTATE[HY000] [1045] Access denied for user 'dev'@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table_schema = nyotsong and table_name = migrations and table_type = 'BASE TABLE')
at D:\NyoTsong videos\test11\myshop\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|
Exception trace:
1 Doctrine\DBAL\Driver\PDO\Exception::("SQLSTATE[HY000] [1045] Access denied for user 'dev'@'localhost' (using password: NO)")
D:\NyoTsong videos\test11\myshop\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDO\Exception.php:18
2 Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
D:\NyoTsong videos\test11\myshop\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:42
Illuminate\Database\QueryException : SQLSTATE[HY000] [1045] Access denied for user 'dev'@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table_schema = nyotsong and table_name = migrations and table_type = 'BASE TABLE')
at D:\NyoTsong videos\test11\myshop\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|
Exception trace:
1 Doctrine\DBAL\Driver\PDO\Exception::("SQLSTATE[HY000] [1045] Access denied for user 'dev'@'localhost' (using password: NO)")
D:\NyoTsong videos\test11\myshop\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDO\Exception.php:18
2 Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
D:\NyoTsong videos\test11\myshop\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:42
Re: Database Migration Failure
Your database doesn't accept connections from user "dev" without password. Add a user with a password to your MySQL server and set the user/password in your Laravel .env file in the application root directory:
See also:
- https://dev.mysql.com/doc/refman/8.0/en/alter-user.html
- https://dev.mysql.com/doc/refman/8.0/en/grant.html
Code: Select all
ALTER USER 'dev'@'localhost' IDENTIFIED BY 'secret';
GRANT ALL ON *.* TO 'dev'@'localhost';
- https://dev.mysql.com/doc/refman/8.0/en/alter-user.html
- https://dev.mysql.com/doc/refman/8.0/en/grant.html
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star