Magento create admin user mysql query
To create magento user simply run the following query –
LOCK TABLES admin_role WRITE , admin_user WRITE; SET @SALTEM = "rp"; SET @PASSWORD = CONCAT(MD5(CONCAT( @SALTEM , "123456") ), CONCAT(":", @SALTEM )); SELECT @EXT := MAX(extra) FROM admin_user WHERE extra IS NOT NULL; INSERT INTO admin_user (firstname,lastname,email,username,password,created,lognum,reload_acl_flag,is_active,extra,rp_token_created_at) VALUES ('John','Doe','admin@email.com','admin',@PASSWORD,NOW(),0,0,1,@EXT,NOW()); INSERT INTO admin_role(parent_id,tree_level,sort_order,role_type,user_id,role_name) VALUES (1,2,0,'U',(SELECT user_id FROM admin_user WHERE username = 'admin'),'John'); UNLOCK TABLES;
After running this query you will be able to login in magento admin
by using the :
username – admin
password – 123456
Advertisements
Add Comment
📖 Read More
- 1. Magento Error when flushing or deleting cache in magento 1.9 | magento error after flushing cache
- 2. Base table or view already exists: 1050 Table 'core_email_queue' already exists, query was: CREATE TABLE `core_email_queue` in magento 1.9
- 3. Could not resolve host: magento-community
- 4. Magento core_email_template setup | Base table or view not found: 1146 Table 'core_email_template' doesn't exist
- 5. Increase Decrease Quantity Button