رفع خطای SQLSTATE HY000 1045 لاراول

خطای SQLSTATE HY000 1045 زمانی رخ می دهد که قادر به اتصال در دیتابیس لاراول نباشیم که خطای ناموفق بودن اتصال به دیتابیس به این صورت است:

 SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost'  (using password: YES)

برای حل این مشکل اطلاعات دیتابیس رو چک کنید که هنگام اتصال به Mysql اطلاعات ورودی درست است یا نه…

 DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=test
DB_USERNAME=root
DB_PASSWORD=''

و دستورات زیر را در ترمنیتال به ترتیب وارد کنید:

 php artisan migrate
php artisan cache:clear
php artisan config:clear
php artisan config:cache

موفق باشید

4 دیدگاه برای “رفع خطای SQLSTATE HY000 1045 لاراول”

  1. Sophia گفت:

    Hi there would you mind stating which blog platform you’re working with?
    I’m looking to start my own blog soon but I’m having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique.
    P.S My apologies for getting off-topic but I had to ask!

    1. سایتوس گفت:

      Hi…
      This blog is powered by the WordPress content system and its design style is based on the Bulma framework and has been designed and Coding by myself …
      WordPress meets all your blogging needs and has full features, you can even set up download sites, company or store (WooCommerce) what you need with WordPress …
      Do not hesitate to choose WordPress …
      Good luck…

  2. Kari گفت:

    My developer is trying to persuade me to move to .net from PHP.

    I have always disliked the idea because of the costs.
    But he’s tryiong none the less. I’ve been using
    Movable-type on several websites for about a year and am anxious
    about switching to another platform. I have heard fantastic things about blogengine.net.
    Is there a way I can import all my wordpress content into
    it? Any kind of help would be greatly appreciated!

    1. سایتوس گفت:

      hi…
      Why do you want to migrate with .net? When WordPress meets all the needs of the user and has full features …

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *