This video will discuss how to create a database using PhpMyAdmin and connect to that database using PHP- mysqli. Syntax is discussed as well as some best pr. Last week we released a new version of XAMPP for Linux providing the new MySQL 5 software. Today we also can announce a new version for Windows containing the new version of MySQL. Also new in the Windows version of XAMPP: upgraded version of Apache (2.0.55), PHP (4.4.1), phpMyAdmin (2.6.4-pl3) and OpenSSL (0.9.8a). Download XAMPP for Windows! Changing the MySQL ports. The default MySQL port is 3306. Sometimes, this needs to be changed. Follow these steps to enjoy your new port. Step 1: First, reach in the folder where you have installed your Xampp Software. Step 2: After that, go to the destination file – mysql/bin/my.ini (The ‘my‘ file with extension of Configuration Settings).
Changing default MySQL port in Xampp
Using Xampp Mysql
For situations like setting-up localhost in enterprise setting or for setting up localhost in development system for Web development changing default port of MySQL in Xampp is critical. We will change default MySQL port in Xampp by changing port number in Xampp ini files as well as Xampp settings.
Total number of file to change default 3306 to something else(let’s we change the port from 3306 to 3307) is three.
The files involved, to change the default MySQL port in Xampp are –
my.inifile in MySQL config(in total 2 instances, and other 3 in comments)
config.inc.phpin Apache config (in total 1 instance)
php.inifile in Apache Config( total 2 instance)
And the final one is in Xampp Config > Service and port Settings (1 instance)
Opening Config files with notepad++
Before changing port number by config files, set-up notepad++ to open up the config files. Although any text editor can be choosen for this purpose, but for this article, we will use notepad++ to open config files in Xampp.
To set notepad++ to default to open up config files in Xampp, install notepad++ by following any guide, which is straightforward. And write notepad++.exe in Configuration of Control Panel > Editor Xampp settings.
(1/4)Changing my.ini file configurations in MySQL config
For changing my.ini file, we need to stop the running XAMPP server 1. Apache server 2. MySQL server, or additional servers running though Xampp to avoid any Application or System failure.
Open my.ini file in MySQL config in Xampp control Panel
Acronis true image home 2021. Click the
config button of MySQL in Xampp Control Panel, and it will open-up option of
my.ini and <choose>. click my.ini file, and as we have notepad++ as default editor, notepad++ will open the my.ini file.
Find 3306 in my.ini file in the notepad++ editor
Find for 3306 in the my.ini file opened in the notepad++ editor, there will be total 5 occurrences, but first two should be changed, and the later three occurrences will be in comment.
- (1/6)First occurrence will be in line number
20, it is to be changed to 3307
- (2/6)And the second occurrence will be in line number
29, it also is to be changed to 3307
Now save the my.ini file and you may close the file.
(2/4)Changing config.inc.php file configurations in Apache config
Next we should change the third occurrence of port number 3306, which will be in
config.inc.php file. Open the file, from the Config menu beside Apache > config button, and choose the config.ini.php option, to open this file with editor.
Xampp Password For Mysql
Find 3306 in config.inc.php file in the notepad++ editor
After we open up
config.inc.php file in notepad++ editor, look for 3306, which will be in line number
27. The only occurrence(3/6) will be in line number 27, change port number from
$cfg['Servers'][$i]['host'] = '127.0.0.1:3307';
Save the file, and file can be closed
(3/4) Changing php.ini file configurations in Apache config
The php.ini file have in total two occurrences of port number to change. Open
php.ini file beside Apache config. Open the file from Apache > config button.
After opening the file with notepad++, look for port number
- The first occurrence will be in line number
- The second occurrence will be in line number
After replacing with new port number, save and close the
(4/4)Changing Mysql port in Xampp control panel configurations
Our final occurrence of the port number to change is in the XAMPP control panel.
- open Xampp open control Panel
- then the config button on the top of all buttons
- then open up service and port settings button
- this will open Apache tab by default, but switch to MySQL tab
- change from default 3306 port to 3307, and save and close in the MySQL tab
- and finally save and close in service and port settings panel
Start MySQL in Xampp with new port number
As we have changed from default port number from 3306 to 3307 in first two occurrence in the my.ini file, third occurrence in the config.inc.php file and the final occurance in the Xampp Control Panel config. We have saved and closed the files and the Xampp control panel config.
Now start the server, we see that the default port number of MySQL in Xampp is changed from 3306 to our choosen 3307. The port number can be any number upon the system and application dependency, this port number was shown as an example.
In this article, how to change default MySQL port in Xampp was discussed.