SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. (SQL: select * from `threads` order by `created_at` desc)
1)i am watching the create a forum series and in lesson 2 i am stuck in testing, there if you watch jeff uses sqlite for testing purpose i did same but i am getting above error.i tried changing 127.0.0.1 to localhost and clearing cache, config etc but not working here is my .evn
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:h90atKo/VaDe9Cgh0dXHrB5kpkq4uGqXcVflJJ6jfAw=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=forum
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
my phpunit.xml
<env name="APP_ENV" value="testing"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
- i cannot write test function name util i dont prefix it with test, if i dont do that phpunit gives warning of no test found in test/feature/testclass, while jeff can write without doing it to clear my point -> a_user_can_view_all_threads and when i write i have to write it like this->test_a_user_can_view_all_threads
ok correct me if i am wrong, i think i misleaded my self. so may be in past i didnt knew and may be xampp running in background and i didnt noticed it. ok what u people say we can interact with database using php artisan serve without using (xampp/laragon etc)?in my case i cannot, and i think its problem that can be solved or i am just wasting my time i mean newbies will do stuff like that i wasted(may be it give some fruit) my whole day on this?
the answer is no its not possible to access phpmyadmin or interact with database by using only php artisan serve and not using laragon,xampp etc?
Please or to participate in this conversation.