-->
  • Recent Articles

    How to Add remote host in phpMyadmin

    How to Add remote host in phpMyadmin


    Solution:

    1. edit the file /etc/phpMyAdmin/config.inc.php
    2. Add the Remote host in the format given below.

    $i++;
    $cfg['Servers'][$i]['host']          = '192.168.1.2'; // MySQL hostname or IP address
    $cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
    $cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
    $cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
    $cfg['Servers'][$i]['extension']     = 'mysqli';    // The php MySQL extension to use ('mysql' or 'mysqli')
    $cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
                                                        // (requires PHP >= 4.3.0)
    $cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings
                                                        // (this user must have read-only
    $cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"
                                                        // and "mysql/db" tables).
                                                        // The controluser is also
                                                        // used for all relational
                                                        // features (pmadb)
    $cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
    $cfg['Servers'][$i]['user']          = 'username';          // MySQL user  -------> Make sure this user created in the mysql server
    $cfg['Servers'][$i]['password']      = 'password';          // MySQL password (only needed

    3. Restart Apache.
    service httpd restart


    Create MySQL user:

    CREATE USER username@'Phpmyadmin server' IDENTIFIED BY 'password';
    GRANT ALL PRIVILEGES ON <db>.* to username@'phpmyadmin server' IDENTIFIED BY 'password';
    FLUSH PRIVILEGES;
    quit;

    No comments