Requirements: phpMyadmin is already installed on local MySQL server.
Step 1- Create a user database on MySQL remote server
GRANT ALL PRIVILEGES ON 'dbname'.* TO 'username'@'phpmyadmin-ip' IDENTIFIED BY 'password';
Step 2- Edit the config.ini.php
- Open and add the below lines in the config.ini.php at the end (/etc/phpMyadmin/ or /var/www/html)
$i++; $cfg['Servers'][$i]['verbose'] = 'alias of emote mysql'; $cfg['Servers'][$i]['host'] = 'remote-mysql-ip'; $cfg['Servers'][$i]['port'] = '3306'; $cfg['Servers'][$i]['socket'] = ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['compress'] = FALSE; $cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['user'] = 'username'; $cfg['Servers'][$i]['password'] = 'password';
Note: Replace IP address, user database and password of remote mysql server.
- Restart web server (Apache or Nginx,…)
Để lại một phản hồi