Friday, August 10, 2007

MySQL Admin

- MySQL
By default, the user cannot connect to mysql db remotely. To enable remote access to a mysql db, suppose the user connect from host IP 10.4.115.211


c:>mysql> mysql --user=root --password=mypassword
mysql> grant select,insert,update, delete on db_name.* to user_name@10.4.115.211 IDENTIFIED BY "user_password";

mysql>show schemas;
mysql>show tables;
mysql>show columns from tbl;

mysql>select * from tbl into outfile 'C:/myexport.txt';

mysql>select * from tbl\G; // the option \G format the output

No comments: