Access remote server with local phpMyAdmin in Ubuntu


Default, the login page of phpmyadmin have only username & password. If you want to add some remote server you can follow by some steps:

  1. Find file “/etc/phpmyadmin/”
  2. Find row “/* Advance to next server for rest of config */” and add some configs below “$i++;”

/* Advance to next server for rest of config */

/* some additional configs  */
$cfg[‘Servers’][$i][‘host’] = ‘’;
$cfg[‘Servers’][$i][‘user’] = ‘mery_box’;
$cfg[‘Servers’][$i][‘password’] = ‘TewKszmceNQA’;
$cfg[‘Servers’][$i][‘auth_type’] = ‘config’;

And the result:


Show log of MySQL when running query in rails

When you run query to select, update, insert… in ruby, you can show log realtime when query is running.

First, go to MySQL and run:

show variables like '%log%';

And find record with variable_name =  general_log_file and get its value. In case, value is /var/lib/mysql/OFF016.log


Then, set

set global general_log = 1;

Then, open terminal and run:

sudo tailf <value>

In case is:

sudo tailf /var/lib/mysql/OFF016.log