Thursday, September 17, 2009

Mysql Commands

To list the users,host in the mysql

select Host ,User ,Password from mysql.user;

To set mysql root password

mysqladmin -u root password newpassword ;


To delete the host from mysql

DELETE FROM mysql.user where host=hostname;


To drop the user

DROP USER 'desiyou'@'localhost';


To Start the multiple instance in Mysql


mysqld_multi --config-file=/etc/my2.cnf start 1
mysqld_multi --config-file=/etc/my2.cnf start 2


Mysql Case Sensitive

vim /etc/my.cnf

lower_case_table_names=1

To know the status of mysql :

SHOW STATUS;

To know the mysql process status :

SHOW FULL PROCESSLIST\G
show variables;

No comments:

Post a Comment