More MySQL Examples

From Free Knowledge Base- The DUCK Project
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Just Some More Examples Here:

user management

GRANT USAGE ON mysql.* TO 'username'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT ( Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv ) ON mysql.user TO 'username'@'localhost';
GRANT SELECT ON mysql.db TO 'username'@'localhost';
GRANT SELECT ON mysql.host TO 'username'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) ON mysql.tables_priv TO 'username'@'localhost';
insert into tablename ( field1, field2, field3 ) values ( 'LNX', 'RZ1', 1 );
alter table movies add mediatype varchar(8);

version and installation info

at the mysql prompt type:

mysql> status

details about your installation

on a running mediawiki installation the special page "Special:Version" also has version information

/index.php/Special:Version