MySQL Notes

From Brandonhutchinson.com

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 +
* To list the databases on a MySQL server:
 +
show databases;
 +
 +
* To list the tables in a MySQL database:
 +
show tables;
 +
* To securely provide a user password automatically, place user passwords within the ''[client]'' section of ''~/.my.cnf''. The file should have 600 or 400 permissions. e.g.,
* To securely provide a user password automatically, place user passwords within the ''[client]'' section of ''~/.my.cnf''. The file should have 600 or 400 permissions. e.g.,
[client]
[client]
password="''password''"
password="''password''"
[http://dev.mysql.com/doc/refman/5.1/en/password-security.html 5.5.6. Keeping Your Password Secure]
[http://dev.mysql.com/doc/refman/5.1/en/password-security.html 5.5.6. Keeping Your Password Secure]

Revision as of 15:33, 14 April 2008

  • To list the databases on a MySQL server:
show databases;
  • To list the tables in a MySQL database:
show tables;
  • To securely provide a user password automatically, place user passwords within the [client] section of ~/.my.cnf. The file should have 600 or 400 permissions. e.g.,
[client]
password="password"

5.5.6. Keeping Your Password Secure

Personal tools