support@codebucket.net

How to resolve the errors of xampp (Part 1)

How to resolve the errors of xampp (Part 1)

K. M. Shawkat Zamil | November 25, 2022

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

 

K. M. Shawkat Zamil

K. M. Shawkat Zamil

Senior Software Engineer

I am a Senior Software Engineer in a reputed company in Bangladesh. I am a big fan of Laravel, PHP Programming, MSSQL Server, MySql, JavaScript, and lots more. I love to help people who are especially eager to learn. I believe in patience and motivation.