DEV Community

loading...

Add user with all privileges in MySQL 8

Dênis Mendes
Developer
・1 min read

First things first you need to connect to mysql service:

mysql -u root -p

After that we can create an user:

CREATE USER 'username_here’@‘%’ IDENTIFIED BY ‘password_here’;

Then we have an user and now we can set all privileges to the user:

GRANT ALL PRIVILEGES ON*.* TO ‘username_here’@‘%’ WITH GRANT OPTION;

It's done! You have an user with all privileges set to the user.

Discussion (0)

Forem Open with the Forem app