cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a new user within MySql

SOLVED

Creating a new user within MySql

Hi,

I am attempting to create a new admin user within mySql. Is the following guide still current?

https://webnoo.com/support/knowledge/create-new-admin-user-magento-via-phpmyadmin-mysql-command/

 

The query reference a table 'admin_role' however, it is not located in my database. This seems strange. Is anyone able to assist?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Creating a new user within MySql

Hello @james_raptis 

 

Well, I would say instead of creating admin user using mysql - create the admin user using command line - run below command from the SSH terminal.

 

php bin/magento admin:user:create --admin-user="admin" --admin-password="admin@1234" --admin-email="admin@test.com" --admin-firstname="Admin" --admin-lastname="AdminTest"

It will create admin user and you will able to access the backend with the given credentials.

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

View solution in original post

5 REPLIES 5

Re: Creating a new user within MySql

Hello @james_raptis 

 

Well, I would say instead of creating admin user using mysql - create the admin user using command line - run below command from the SSH terminal.

 

php bin/magento admin:user:create --admin-user="admin" --admin-password="admin@1234" --admin-email="admin@test.com" --admin-firstname="Admin" --admin-lastname="AdminTest"

It will create admin user and you will able to access the backend with the given credentials.

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Creating a new user within MySql

Hi,

I think creating admin user through cli-command will be much better and easy way :

php bin/magento admin:user:create

after running this command it will ask for username, first name, last name and email.

Then your admin user will be created successfully.

 

 And for the table which you could not find in query:
The query reference a table 'admin_role' however, it is not located in my database.

you can check the table with this name: "authorization_role".

 

Hope it helps !

 

if issue solved,Click Kudos & Accept as Solution

 

Re: Creating a new user within MySql

Thank you very much for your assistance guys, I really appreciate it.

Re: Creating a new user within MySql

Hi @james_raptis 

 

Happy to help and keep helping others Smiley Happy

if issue solved,Click Kudos & Accept as Solution

Re: Creating a new user within MySql

Hello @james_raptis ,

Happy to help you. Smiley Happy