Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql grant all privileges to a user

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

mysql user permission database

GRANT ALL PRIVILEGES ON `db_name`.* TO 'user'@'host'
Comment

mysql grant user permissions

-- create user if not exists
-- CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';");

-- grant all user permissions on all database and tables
-- GRANT ALL ON *.* TO 'username'@'localhost'");

-- create specific database
-- CREATE DATABASE newdatabase

-- grant all user permissions on db 'newdatabase' and all tables
-- GRANT ALL ON newdatabase.* TO 'username'@'localhost'");

-- grant all user permissions on db 'newdatabase' and table 'newtable'
-- GRANT ALL ON newdatabase.newtable TO 'username'@'localhost'");
Comment

PREVIOUS NEXT
Code Example
Sql :: insert many to many sql 
Sql :: postgresql create table many-to-many 
Sql :: how to find 2nd highest salary in a table 
Sql :: mysql join two tables 
Sql :: mysql:5.6 syntax create table 
Sql :: union vs union all in sql 
Sql :: power bi union columns 
Sql :: r write csv without index 
Sql :: See Foreign Key 
Sql :: joins in sql 
Sql :: power query datetime to date 
Sql :: mysql decimal remove trailing zeros 
Sql :: sql insert into statement 
Sql :: mysql max() 
Sql :: json to dynamic columns in sql 
Sql :: having in sql server 
Sql :: add column mysql with foreign key 
Sql :: insert data from one database table to another database table in postgresql using pgadmin 
Sql :: sql server delete records with specific date 
Sql :: SQL Syntax of INNER JOIN 
Sql :: faire la différence entre deux tables sql big query 
Sql :: how to select from mssql 
Sql :: delete and drop in sql 
Sql :: how to replace null values in sql 
Sql :: tsql generate rows 
Sql :: mysql update multiple columns 
Sql :: mssql unique key accept nulls 
Sql :: postgresql insert multiple rows 
Sql :: sql merge statement 
Sql :: linq inner join 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =