Answers for "how to make a user an admin in mysql"

SQL
17

create user mysql

CREATE USER 'norris'@'localhost' IDENTIFIED BY 'password';
Posted by: Guest on March-07-2020
1

create mysql user

#in the case below, your username is dbuser
#and we assume that the mysql db is located in the same server or box from where you want to access it from
#after the IDENTIFIED BY and within the single qoute (') you you should replace 'complexPassword' with a password your desire
CREATE USER 'dbuser'@'localhost' IDENTIFIED BY 'complexPassword';

#we assume that the name of your database is db_name
#the command below grants the user you created with privilege to only database db_name
#if your want dbuser to have access to all database the replace db_name with *
GRANT ALL PRIVILEGES ON db_name . * TO 'dbuser'@'localhost';

#the command below reloads the privileges of mysql with your new user privileges
FLUSH PRIVILEGES;

#don't forget give a thumbs up
Posted by: Guest on September-23-2021

Code answers related to "how to make a user an admin in mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language