* To start mysql server:
/etc/init.d/mysqld start * To stop mysql server:
/etc/init.d/mysqld stop * To restart mysql server
/etc/init.d/mysqld restart
or
/etc/init.d/mysql restart
To connect the database from other system /etc/mysql/my.cnf
comment this line #bind-address
and also execute the following queries in mysql database
>INSERT INTO `user`(`Host`,`User`,`Password`,`Select_priv`,`Insert_priv`,`Update_priv`,`Delete_priv`,`Create_priv`,`Drop_priv`,`Reload_priv`,`Shutdown_priv`,`Process_priv`,`File_priv`,`Grant_priv`,`References_priv`,`Index_priv`,`Alter_priv`,`Show_db_priv`,`Super_priv`,`Create_tmp_table_priv`,`Lock_tables_priv`,`Execute_priv`,`Repl_slave_priv`,`Repl_client_priv`,`Create_view_priv`,`Show_view_priv`,`Create_routine_priv`,`Alter_routine_priv`,`Create_user_priv`,`ssl_type`,`ssl_cipher`,`x509_issuer`,`x509_subject`,`max_questions`,`max_updates`,`max_connections`,`max_user_connections`) VALUES ( '%','root','*24','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','','0','0','0','0');
> UPDATE `user` SET `Host`='%',`User`='root',`Password`='*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19',`Select_priv`='Y',`Insert_priv`='Y',`Update_priv`='Y',`Delete_priv`='Y',`Create_priv`='Y',`Drop_priv`='Y',`Reload_priv`='Y',`Shutdown_priv`='Y',`Process_priv`='Y',`File_priv`='Y',`Grant_priv`='Y',`References_priv`='Y',`Index_priv`='Y',`Alter_priv`='Y',`Show_db_priv`='Y',`Super_priv`='Y',`Create_tmp_table_priv`='Y',`Lock_tables_priv`='Y',`Execute_priv`='Y',`Repl_slave_priv`='Y',`Repl_client_priv`='Y',`Create_view_priv`='Y',`Show_view_priv`='Y',`Create_routine_priv`='Y',`Alter_routine_priv`='Y',`Create_user_priv`='Y',`ssl_type`='',`ssl_cipher`='',`x509_issuer`='',`x509_subject`='',`max_questions`='0',`max_updates`='0',`max_connections`='0',`max_user_connections`='0' WHERE `Host`='%' AND `User`='root';
and now restart mysql using sudo /etc/init.d/mysql restart