What steps will reproduce the problem?
following tutorial code(dot)tutsplus(dot)com /tutorials/building-your-startup-with-php-feature-requirements-and-database-design–cms-22618
install yii, make a database, user, put the credentials in \environments\dev\common\main-local.php
<?php
return [
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=your-db',
'username' => 'your-username',
'password' => 'your-pwd',
'charset' => 'utf8',
],
then run ./yii migrate/up 1
What is the expected result?
Creating migration history table "migration"…done.
Total 1 out of 15 new migrations to be applied:
What do you get instead?
Error: SQLSTATE[28000] [1045] Access denied for user ‘root’@‘localhost’ (using password: YES)
on clearlinux web server
-or-
Exception ‘yii\db\Exception’ with message ‘SQLSTATE[HY000] [1045] Access denied for user ‘root’@‘localhost’ (using password: YES)’
on Ubuntu localhost
Additional info
Q A
Yii version 2.0.?
PHP version 5.6.31 and/or 7.1.8
Operating system Ubuntu 17.10 and/or CloudLinux