mysql> drop database databasename;

mysql> SELECT SUM(*) FROM [table name];

mysql> drop table tablename;

mysql> SELECT * FROM tablename;

# mysql -u root -p mysql> use mysql; mysql> INSERT INTO user (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) VALUES (‘%’,’databasename’,’username’,’Y’,’Y’,’Y’,’Y’,’Y’,’N’); mysql> flush privileges; or mysql> grant all privileges on databasename.* to username@localhost; mysql> flush privileges;.

# mysqladmin -u root password newpassword.

# mysqladmin -u root -p oldpassword newpassword.

mysql> SELECT DISTINCT columnname FROM tablename;

By below method if password is pass and user name is root # [mysql dir]/bin/mysql -h hostname -u root -p pass.

T# [mysql dir]/bin/mysqladmin -u username -h hostname.blah.org -p password ‘new-password’.

# mysql -u root -p mysql> SET PASSWORD FOR ‘user’@’hostname’ = PASSWORD(‘passwordhere’); mysql> flush privileges;.