This post has been republished via RSS; it originally appeared at: Azure Database Support Blog articles.
Today, we received a good question about how to connect to Azure Database for MySQL or MariaDB using PhpMyAdmin in a WAMP environment.
After several tests it was very simple to configure it:
- Install WAMP service (in this case in a Windows Server).
- Once the installation finished and the Apache service is running, review if we are able to connect locally using http://127.0.0.01
- As you could see in the image below, we have a link with name phpmyadmin.
- But, before, you need to modify the file config.inc.php placed on the folder C:\wamp64\apps\phpmyadmin4.8.4 (based on my installation and version) and change the following parameters:
- If you are connecting to Azure Database for MySQL you need to modify the section
- if($wampConf['SupportMySQL'] == 'on') {
/* Server: localhost [1] */
$i++;
if($mariaFirst) $i++;
$cfg['Servers'][$i]['verbose'] = 'MySQL';
$cfg['Servers'][$i]['host'] = 'yourserver.mysql.database.azure.com';
$cfg['Servers'][$i]['port'] = $wampConf['mysqlPortUsed'];
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'username@yourserver';
$cfg['Servers'][$i]['password'] = '';
- if($wampConf['SupportMySQL'] == 'on') {
- If you are connecting to Azure Database for MariaDB you need to modify the section
- if($wampConf['SupportMariaDB'] =='on') {
$i++;
if($mariaFirst) $i -= 2;
$cfg['Servers'][$i]['verbose'] = 'MariaDB';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = $wampConf['mariaPortUsed'];
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
- if($wampConf['SupportMariaDB'] =='on') {
- And after these modifications, you will be able to connect to them.
Enjoy!!