Magento Expert Forum - Improve your Magento experience

Results 1 to 4 of 4

Admin Login - Access Denied

  1. #1
    New member
    Join Date
    Nov 2015
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Admin Login - Access Denied

    I am having trouble logging in to my Admin Panel. It is telling me that Access is denied for Admin User. Can someone please step me through adding a new User to the Database from the MySQL login in my hosting so that I can sort this out?

    Thanks Heaps guys

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Jun 2016
    Location
    Bhavnagar, Gujarat, India
    Posts
    17
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    You need to follow these steps:
    For Magento 1.X:-
    1. Open MySQL
    2. Add new row in admin_user table
    3. Use the ID and password for login

    For Magento 2.X:-
    1. Run following command from Shell
    php bin/magento admin:user:create --admin-user=[data] --admin-password=[data] --admin-email=[data] --admin-firstname=[data] --admin-lastname=[data]
    2. Used the ID and password for login

  3. #3
    Junior Member knowband.plugins's Avatar
    Join Date
    Jul 2016
    Location
    Noida, India
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You can create new user using mysql query.

    LOCK TABLES `admin_role` WRITE , `admin_user` WRITE;

    SET @SALT = "rp";
    SET @PASS = CONCAT(MD5(CONCAT( @SALT , "password") ), CONCAT(":", @SALT ));
    SELECT @EXTRA := MAX(extra) FROM admin_user WHERE extra IS NOT NULL;

    INSERT INTO `admin_user` (firstname,lastname,email,username,password,create d,lognum,reload_acl_flag,is_active,extra,rp_token_ created_at)
    VALUES ('Firstname','Lastname',[email protected]','myuse r',@PASS,NOW(),0,0,1,@EXTRA,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 = 'myuser'),'Firstname');

    UNLOCK TABLES;


    Regards,

    Knowband Plugins | Buy Best Magento Extensions

  4. #4
    New member
    Join Date
    Jan 2017
    Location
    6830 N Eldridge Pkwy
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    VALUES (1,2,0,'U',(SELECT user_id FROM admin_user WHERE username = 'myuser'),'Firstname');

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •