Reputation: 4546
I just used artisan migrate to create some table, but I get an error of Type PDO:
[PDOException]
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
A php/mysql testscript could connect to the database just fine, but it was another virtualhost and it did not use PDO.
In Laravel4 edited app/config/local/database.php to set the password and database name.
edit in start.php
UPDATE
I hardcoded the password in the PDO connection array and now terminal says there is no database named "database". Clearly it is looking somewhere else for the config, but I have no other config file.
(Due to following a tutorial about making a "local" directory it was not working for me)As it stands, I have downloaded the stable version and everything is working great. I am going to delete this post, to keep the forum clean.
Upvotes: 0
Views: 2739
Reputation: 1
Kindly Check Your app/config/database.php file in local host.
1.)Make Sure local Host Data Base name is Correct
2.)Make sure local Host Data Base username is correct.
3.)Make sure local Host Data Base password is correct.
Upvotes: 0
Reputation: 400
Make sure you are setting up a 'local' environment in start.php Otherwise Laravel will look for DB config in app/config/database.php
Upvotes: 1
Reputation: 500
Make sure you have set up your database connection correctly in app/config/database
Upvotes: 1