It's the first time I using laravel to generate PHP program, at first I create a blog by composer, and in this blog, I can run php artisan.
However, I download a laravel project from internet, I cannot run artisan and give me the ERROR result as follow.
[Illuminate\Database\QueryException]
SQLSTATE[HY000] [2002] No such file or directory (SQL: select count(*) as
aggregate from plugins
where name
= Ldap and status
= 1)
[Doctrine\DBAL\Driver\PDOException] SQLSTATE[HY000] [2002] No such file or directory
[PDOException] SQL STATE [HY000] [2002] No such file or directory
and the mySQL serve of my XAMPP shutting down at the same time, what confuse me is I can visit this project via vitrual host.
I think maybe there are some mistake about the root right of mySQL, but I don't know how to deal with.
0
votes
where did you download the project? you can check the website for direction on installation, most developer will add a guide to it.
– Olasunkanmi
I get this error when i do not start wamp and try to query database. However it could mean the following things, your username is wrong, the password or the port you are trying to connect with is wrong.
– f_i
1 Answers
0
votes
Try to install laravel using cmd(composer) by entering command "composer create-project --prefer-dist laravel/laravel blog" this will create a folder of blog in the current directory where you executed the command. It will take some time to download and install so wait upto 5 mints. After that run command "php artisan serve" and then you can start using laravel by visiting localhost:8000