1

my .env file setup like this on the live server. but while I am

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=onlyaruv_notepad-apps
DB_USERNAME=onlyaruv_notepad
DB_PASSWORD=mypassword

the error was

SQLSTATE[28000] [1045] Access denied for user 'onlyaruv_notepad'@'127.0.0.1' (using password: YES) (SQL: select * from `users` where `email` = [email protected] limit 1)

I access my ssh via putty using this host and password http://5.100.156.10:2082 I am confused .

5
  • did you run php artisan config:cache on the server? Commented Jul 12, 2017 at 5:49
  • did try to run your mysql on visual database design tool like workbech or phpmyadmin Commented Jul 12, 2017 at 7:18
  • Run composer dump-autoload Commented Jul 13, 2017 at 6:08
  • try to connect from putty Access remote database from command line. Disregard "remote", you can put your 127.0.0.1 Commented Oct 18, 2017 at 13:05
  • mysql -u onlyaruv_notepad -pmypassword -h 127.0.0.1 "onlyaruv_notepad-apps" Note that -p needs to be "glued" to your pass (no spaces) Commented Oct 18, 2017 at 13:08

2 Answers 2

0

Have you given All privileges to onlyaruv_notepad this user? if you not please give all privileges to the user. still, The problem not solved check host is correct or not. (change DB_HOST=127.0.0.1 to DB_HOST=localhost

Sign up to request clarification or add additional context in comments.

3 Comments

@Sharifur Have you given All privileges to onlyaruv_notepad this user?
yes, I do but still the same error what can I do for this?
SQLSTATE[28000] [1045] Access denied for user 'onlyaruv_napps'@'127.0.0.1' (using password: YES) (SQL: select * from users where email = [email protected] limit 1)
0

Check your database connection carefully. If it does not work then Run the following artisan command and try again

php artisan config:clear
php artisan cache:clear
php artisan view:clear

1 Comment

did every thing whatever you say. but no result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.