Give the syntax of GRANT commands?
Answers were Sorted based on User's Feedback
Answer / rajan vardawaj
The generic syntax for GRANT is as following GRANT [rights]
on [database] TO [username@hostname] IDENTIFIED BY
[password] Now rights can be: a) ALL privilages b)
Combination of CREATE, DROP, SELECT, INSERT, UPDATE and
DELETE etc. We can grant rights on all databse by usingh *.*
or some specific database by database.* or a specific table
by database.table_name.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / kamal
GRANT ALL on *.databasename to root identified by 123456
| Is This Answer Correct ? | 4 Yes | 0 No |
GRANT ALL ON mydb.mytbl TO 'someuser'@'somehost';
GRANT SELECT, INSERT ON mydb.mytbl TO 'someuser'@'somehost';
| Is This Answer Correct ? | 2 Yes | 0 No |
How do I find the database name in mysql?
How do you create a primary key?
What is mysql url?
Is mariadb better than mysql?
What is a definer?
how to dump all databases for backup. Backup file is sql commands to recreate all db's.
How to get a list of columns in an existing table?
How to copy data from one server to another using php?
What is the use of mysqli_connect in php?
can you tell how can you display the maximum salary in sql? : Mysql dba
how we connect the data base in any programme
How to decrement dates by 1 in mysql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)