A Couple MySQL Administrative Queries

March 27, 2006

MySQL LogoThere are a few tasks in MySQL which I do rarely and usually graphically. This in turn leads to sifting through lots of documentation to refresh my memory. Not anymore… here are those commands so I’ll always know exactly where to find them.

First is a basic command for granting privileges to a user, the example shows all privs from a specific host to a user from a specific host including the ability to grant further privs to others:
GRANT ALL ON * TO 'username'@'hostname' IDENTIFIED BY 'password' WITH GRANT OPTION;

The above is not a good thing to do willy nilly. The command creates a superuser, though sometimes you need these…

The next thing i do more regularly these days is slip tuning configuration parameters in during runtime. This is useful if you’ve experienced some significant growth and want to tune you db without a restart. Keep in mind these settings will be lost if the database is restarted:
SET GLOBAL wait_timeout=60;

mysql, sql, code, grant, set global

Tags: , , , ,

Related:


Comments

One Response to “A Couple MySQL Administrative Queries”

  1. Mike on April 21st, 2006 9:46 am

    Well thanks! I got some use out of that command as well :) I can never remeber the arguments for it.

Got something to say?





User contributed tags: t (25) - tallest couple (23) - mysql wait_timeout (19) - world's ugliest couple (12) - World's tallest couple (12) - mysql administrative commands (9) - mysql (8) - "grant super" mysql (7) - mytop grant (6) - mysql grant super (5) - MySQL "Administrative queries" (5) - ugliest couple (4) - f (4) - mytop mysql (4) - ugliest couple in the world (3) - wait_timeout mysql (3) - MYSQL administrative command (3) - mysql wait_timeout user specific (3) - administrative Queries (3) - mysql5 granting privileges to a user (2) - mysql wait_timeout tuning (2) - mysql wait_timeout for specific user (2) - tallest couple in the world (2) - sexycomments (2) - mysql wait_timeout jdbc (2) - mysql incoming queries (2) - mytop privileges mysql (1) - mytop privileges (1) - MySQL administration queries (1) - host (1) - mysql wait_timeout admin setting (1) - mytop mysql grants (1) - administrator tool for mysql5 1 (1) - mysql debugging with mytop (1) - mysql commands basic wait_timeout (1) - grant super in mysql (1) - mysql 4 grant super (1) - mysql wait_timeout cmd (1) - mss (1) - wait_timeout=1 wordpress (1) - (300 the movie ringtones) (1) - MySQL JDBC example using wait_timeout (1) - how to set mysql property wait_timeout (1) - Basic Administrative commands in MySQL (1) - mysql performance tuning runtime revolution (1) - mysql 5 GRANT super user example (1) - mytop mysql permission (1) - grant super example mysql (1) - set wait_timeout runtime (1) - mysql wait_timeout=-1 (1) - how to set mysql wait_timeout (1) - privs for mytop (1) - grant super user on mysql (1) - mysql debug incoming queries (1) - granting super role to mysql user (1) - set mysql wait_timeout (1) - mysql runtime set wait_timeout (1) - mysql grants need for mytop user (1) - wait_timeout mysql command (1) - mytop grant mysql (1) - mytop mysql5 (1) - GRANT SUPER ON mysql (1) - "tallest couple" in the world picture (1) - jdbc wait_timeout (1) - mysql grant mytop (1) - world ugliest couple (1) - mysql properties user password wait_timeout (1) - tallest couple in world (1) - mysql GRANT SUPER ON (1) - wait_timeout MYSQL 5 0 (1) - mysql mytop user privileges (1) - mysql properties IDENTIFIED BY PASSWORD (1) - mysql wait_timeout on performance (1) - mysql set wait_timeout for 1 user (1) - mysql administrative (1) - wait_timeout for specific user (1) - mysql grant global (1) - installing sexycomments wordpress (1) - mysql mytop privileges (1) -