MySQL

Create user and set password

create '$user'@'$host';
set password for '$user'@'$host' = password('$password');

Grant all usage rights on a database to a given user

grant all on $database.* to '$user'@'$host';

Show all databases and select one of them

show databases;
use $database;

Show all tables in database and describe the table layout

show tables;
describe $table;
 
mysql.txt · Last modified: 2011/09/07 06:39 by volker
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki