Here some usefull command to administer Mysql Database Server:
#Access command line:
mysql -uroot -upassword
#Viev all user:
select user,password,host from mysql.user;
#Enable root remote login :
GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘password’;
FLUSH PRIVILEGES;
exit;
#Execute Mysql command from bash:
mysql -uroot -e “create database prod”
mysql -uroot -e “CREATE USER ‘prod’@’%’ IDENTIFIED BY ‘MyProd016′”
mysql -uroot -e “GRANT ALL PRIVILEGES ON prod.* TO ‘prod’@’%’ WITH GRANT OPTION”
mysql -uroot -e “FLUSH PRIVILEGES”
exit;