Ticker

6/recent/ticker-posts

Create a user with full privileges on a Mysql or MariaDB database.


 
To create a user with full privileges over a database, we must execute the following 4 commands inside Mysql CLI or Mariadb:

CREATE DATABASE fullkerneldb;
CREATE USER 'userfullkernel'@'localhost' IDENTIFIED BY 'passfullkernel';
GRANT ALL PRIVILEGES ON fullkerneldb.* TO 'userfullkernel'@'localhost';
FLUSH PRIVILEGES;
 
Database: fullkerneldb
user: userfullkernel
pass: passfullkernel
 
If you want to create a super user for all databases:

CREATE USER 'userfullkernel'@'localhost' IDENTIFIED BY 'passfullkernel';
GRANT ALL PRIVILEGES ON *.* TO 'userfullkernel'@'localhost';
FLUSH PRIVILEGES;

 
  
If you want the user to connect from any ip address change localhost to %:


GRANT ALL PRIVILEGES ON *.* TO 'userfullkernel'@'%';
FLUSH PRIVILEGES;

Remember that flush privileges only refreshes the privileges of all users.
 


Reacciones:

Post a Comment

0 Comments