php - i can't login to my magento backend

320

I installed magento 2.1.1 on a WAMP Server and the installation was successful. I was able to login to backend of the Magento but everything changed when i installed a theme. According to the documentation of the theme I have to create a new database inphpmyadmin and import adatabase.sql which came with the theme.

After this I have to editapp/etc/env.php and change the following:dbname,username andpassword with the one I use when creating the database. I followed the procedure and everything worked well but since then I couldn't login to the back-end of the Magento. I have search on the internet for two days now but all posts which I found couldn't resolve my issue so far.

Please help me. Thanks

356

Answer

Solution:

If you have changed your database to another, then the user you originally created won't exist anymore for the Magento install to let you in.

In this case, you're best off creating a new admin user.

You can do this using the Magento commmand line tool:

<path_to_magento>/bin/magento admin:user:create --admin-user="admin" --admin-password="Password1234" --admin-email="[email protected]" --admin-firstname="Admin" --admin-lastname="Admin"
Write your answer




Share solution ↓

Additional Information:

Link To Source
People are also looking for solutions of the problem: foreign key constraint is incorrectly formed laravel

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.


Similar questions

Find the answer in similar questions on our website.

29 php - How to automatically authenticate users with their facebook accounts, providing they have connected to my website before
59 php - Accidentally i deleted admin user in moodle(phpmyadmin),i cant access anything in siteadministration
266 php - Why am I hitting this error, though I created the function according to the fucntionality?
143 php - Attempting to save user input via HTML form and then refer back to it later
94 oauth 2.0 - Cannot use refresh token to get data offline - Login Required error - Google API PHP client?
433 php - Symfony 4 with Material Bootstrap Select Picker not being submitted
264 zend framework - Check valid time without zend_date (but with native php)
638 multithreading - How can one use multi threading in PHP applications
305 php - Renamed a method in codeigniter's controller. How do I redirect using .htaccess?
4 php code within an html code stored inside a php variable, how can this work?

People are also looking for solutions to the problem: php - Filter custom post type by category

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.