Answers for "create mysql user"

SQL
72

mysql create user

CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'user'@'localhost';
FLUSH PRIVILEGES;
Posted by: Guest on May-19-2020
13

mysql add user with all privileges

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;
Posted by: Guest on January-02-2020
15

create user mysql

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

mysql add user with all privileges

# First Login mysql shell..
sudo mysql -u root -p 
CREATE USER 'username'@'localhost' IDENTIFIED BY 'P4ssW0rd';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost';
FLUSH PRIVILEGES;
Posted by: Guest on September-11-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
1

create mysql user

CREATE USER 'newuser'@'%' IDENTIFIED BY 'user_password';
GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'%';
SHOW GRANTS FOR 'newuser'@'%';
FLUSH PRIVILEGES;
Posted by: Guest on May-14-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language