Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql grant all privileges to a user

GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'localhost';
Comment

mysql users and privileges list

SELECT * FROM mysql.user;

SELECT * FROM information_schema.user_privileges;
SELECT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') FROM mysql.user;
SHOW GRANTS FOR 'my_user'@'localhost';
Comment

how to check user grant in mysql

-- to grant all privileges on 1 database and all its table
GRANT ALL PRIVILEGES ON database_name.* TO 'user'@'localhost';
-- to grant all privileges on all databases and all their respective tables
GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost';
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql alter table add column 
Sql :: Mysql Selected All Duplicate Rows 
Sql :: sql group by example 
Sql :: print boolean in plsql 
Sql :: mysql select case insensitive 
Sql :: sql select whole row max column 
Sql :: could not assemble any primary key columns for mapped table sqlalchemy 
Sql :: sql server datetime 
Sql :: power query datetime to date 
Sql :: SQL order by string split length 
Sql :: change password in mysql 
Sql :: sql join on comma separated field 
Sql :: remove all spaces from string sql 
Sql :: case condition in mongodb 
Sql :: xampp mysql command to import a large database 
Sql :: while in sql server 
Sql :: else if sql 
Sql :: delete table sqlite 
Sql :: install mysql 
Sql :: where clause for clob in oracle 
Sql :: How To Rename Table Using MySQL RENAME TABLE Statement 
Sql :: find most frequent word in sql server 
Sql :: postgres insert into table 
Sql :: query inner join 
Sql :: difference in dates sql 
Sql :: export database with data sql server 
Sql :: SQL Syntax of FULL OUTER JOIN 
Sql :: oracle logfile switch 
Sql :: order by in codeigniter query builder 
Sql :: oracle job schedules 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =