A Couple MySQL Administrative Queries
March 27, 2006
There 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;
Tags: code, grant, mysql, set global, sql
Comments
One Response to “A Couple MySQL Administrative Queries”
Got something to say?

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