Friday, August 10, 2007

MySQL Admin

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

c:>mysql> mysql --user=root --password=mypassword
mysql> grant select,insert,update, delete on db_name.* to user_name@ 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: