Hello developers,
Sometimes you get stuck at the very beginning of the development for the errors of xampp server in the local PC. After starting apache and MySQL you got the error like the below image:
We will solve the problem step by step. First, you need to change the MySQL port to solve the initial root cause. For that go to your xampp console and click the config button of MySQL.
Then open the my.ini file. Then replace your previous port with a new port number. After that open the xampp condif.inc.php file like the below:
In the file you will find some code like the one below:
C:/xampp/phpMyAdmin/config.inc.php
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
From that add a new line and set the port as you replace in the my.ini file. my replaced port was 3307, so I add the line like this:
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['port'] = 3307;
$cfg['Lang'] = '';
Then restart the MySQL in the xampp and type localhost/phpmyadmin in the browser. You will not see the error again.
Hope this might help in the journey of development.
Read More: How to pass column name as parameters in a stored procedure