简体   繁体   中英

How to login to admin or backend if magento database is deleted

I was working with magento and by mistake I deleted whole magento database, but on opening magento again from localhost new database was generated successfully.

But now the problem is that I am not able to login in backend.

I created admin user in admin_user table with user name as admin and entered password encrypted with MD5, I also tried with the following query

UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin';

But this also don't help me.

Can anyone tell me now how can I login to backend.

"Parent Role id 'G1' does not exist"

error message is displayed on login as admin

I am using 1.7 version

Magento IS the database. If you've managed to delete it, you start from scratch.

Remove your app/etc/local.xml file, drop all the tables in the Magento database, get your database credentials together and let Magento recreate the complete database table structure from scratch.

Anything else means you start up in some sort of unknown state where the system eventually becomes totally unusable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM