Answers for "add new user mysql"

SQL
75

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
17

create user mysql

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

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
4

mysql create user

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
#grant permissions to a specic database and/or table 
GRANT ALL PRIVILEGES ON database.table TO 'newuser'@'localhost';
#Or grant wildcar permission to any DB/table
GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'localhost';
Posted by: Guest on January-18-2021
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 "SQL"

Browse Popular Code Answers by Language