After successfully running XAMPP on my Mac OS X I have upgraded my system to Yosemite my MySql server stopped starting through my XAMPP manager. After clicking restart all or just Start for MySql database its just going into ‘starting’ and then goes back to ‘stopped’. XAMPP is an easy to install Apache distribution containing MariaDB, PHP, and Perl. Just download and start the installer.
Nice feature on Mac is to open terminal and go to preferences. Hit profiles tab and create a new profile. Under shell type the path to MySQL and enter in everything as you would when going the long way. If mysql is not starting in xampp, it might be a port conflict issue. Mysql run by default on port 3306. You need to check if another application is occupying that port. Use following command to check app occupying a port lsof -nP -i4TCP:3306 if you find an application occupying that port, stop the application and restart xampp.
Changing default MySQL port in Xampp
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.ini
file in MySQL config(in total 2 instances, and other 3 in comments)config.inc.php
in Apache config (in total 1 instance)php.ini
file in Apache Config( total 2 instance)
And the final one is in Xampp Config > Service and port Settings (1 instance)
![Mysql Xampp Mac Mysql Xampp Mac](/uploads/1/3/7/4/137430204/700063666.png)
Xampp Mysql Mac Os X
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
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.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 3306
to 3307
. $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
3306
. - The first occurrence will be in line number
1174
- The second occurrence will be in line number
1976
After replacing with new port number, save and close the
php.ini
War thunder german plane tree. file.(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. War thunder skins.
I’ve been using a
XAMPP
installation on my Mac to do some development. I’ve been working on a project that uses a CakePHP backend and Sencha Touch front end. I had been using PHPMyAdmin for most of the MySQL
work. At some point while referencing table relationships I saw mention of the MySQLWorkbench
application. It sounded interesting, especially for its relationship visualization features, so I thought I would give it a try. Keep in mind I’m primarily a front-end developer that has only dabbled here and there with some back-end, usually under close supervision. What could go wrong?At first I thought I would see if I could just stumble my way through the setup based entirely on intuition and maybe some help from a well designed UI. I tried each of the three
'Connection Method'
options. I tried using ‘localhost’ as well as the actual IP address. I tried the default port 3306 as well as an unspecified/blank port. When all that failed I then turned to the requisite web searches. I found a few results which suggesting making a few edits to various config files. When that failed I resigned to try another day and went back to using PHPMyAdmin.This evening, rather than doing any actual project work, I thought I might take another stab at the seemingly simple task of connecting XAMPP and MySQLWorkbench. After revisiting some of the previous web search results on the issue, I found myself skimming the contents of MySQL’s ‘my.cnf’ file. I noted that it had a line that configure the socket with a path to the XAMPP’s ‘mysql.sock’. This sounded familiar, I remembered one of the ‘Connection Method’ options was ‘Local Socket/Pipe’. Although I had looked at that option before I never actually went so far as to specify a socket. For some reason I really felt that the ‘Standard (TCP/IP)’ option was going to be the winner.
I went back to the MySQLWorkbench connection dialog and finally got a successful connection. Here’s the final settings that worked (without modifying any of the default XAMPP/MySQL config files):
Mysql Xampp Control Panel
Connection Method:
Socket/Pipe Path:
Username:
Local Socket/Pipe
Socket/Pipe Path:
/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock
Username:
root
Other than a ‘Connection Name’ those were the only settings I had to make. I used the ‘Test Connection’ button which prompted me for a password. After supplying the proper password I finally was inform by MySQLWorkbench that I was ‘Connected to MySQL using local socket/pipe … Connection parameters are correct’! Victory!
Port Mysql Xampp Mac
FYI:
I am using: Mac OS X v10.6.8, XAMPP for Mac OS X v1.7.3, and MySQLWorkbench v5.2.42. I found XAMPP’s ‘my.cnf’ file at
I am using: Mac OS X v10.6.8, XAMPP for Mac OS X v1.7.3, and MySQLWorkbench v5.2.42. I found XAMPP’s ‘my.cnf’ file at
'/Applications/XAMPP/xamppfiles/etc/my.cnf'
, which gave me the path to XAMPP’s MySQL socket on line 21
.Xampp Mysql Mac Not Starting
– ddb
16 Sep 2012
16 Sep 2012