Page 1 of 1

xampp 1.7.7 mySQL "deactivated" - [SOLVED]

PostPosted: 04. October 2011 18:46
by getack
I've searched far and wide but I cannot find a solution to my problem as stated in the title.

I've re-installed Xampp several times now, and the problem persists. I downloaded the .7zip archive, and extracted it to my usb stick - I want to have a portable Xampp, so I do not run the setup script.

When I run the control panel, and start Apache and mySQL (NOT as services) all seems fine. But when I go to the status page, it says that mySQL is deactivated, and when I want to open phpMyAdmin, I get a #2002 error.
When I install Apache and mySQL as services, and then run them, only Apache starts. mySQL starts and then stops again. If I try to start it from the Windows Services window, I get a "mySQL failed to start" or something, error.

Some info about the system I'm using:

*Windows 7 Ultimate x64
*Service pack 1

* I downloaded xampp-win32-1.7.7-VC9.7z and extracted into the root directory of a USB drive.
* Setup script was NOT exeuted, as I want to keep everything portable.
* The problem persists even after I execute the setup script.

I am sad that I did not keep the older version I always used, as it worked without a hitch. Everything went wrong for me since version 1.7.4 :(



Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 05. October 2011 00:01
by hackattack142
3 things:

1. If your plan is to use a portable version, there is a special portable version of XAMPP (XAMPP Lite) that is made with relative paths so you do not have to worry about drive mapping issues with your USB drive as well as removes FileZilla, Mercury Mail, and Tomcat to reduce the overall size.

2. Whenever I install a fresh XAMPP on Win7, I need to tweak the config or I will get the same problem as you. In "xampp/mysql/bin/my.ini" uncomment or add the following line under the "[mysqld]" section
Code: Select all
After you have done that and restarted MySQL, try going to phpMyAdmin page again (Note: If your status shows good now but the phpMyAdmin page still shows an error, you may need to hit your Refresh button in your browser or clear your cache as the error page caches itself).

3. If your plan is to run it from a USB stick, you probably do not want to install them services.

Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 05. October 2011 00:04
by Sharley
hackattack142 is quick and replied when I was compiling my message but his points are also valid. :)

You can't use 'services' if running XAMPP on a USB device as it creates a registry entry and so defeats the purpose of using a portable device.

Nor can you run the setup_xampp.bat file as you so rightly pointed out 8)

My suggestion is to uninstall and reinstall again using the only method for a portable devices and that is either the zip or 7zip versions.

Make sure first that you have stopped all components and uninstalled all services and then delete the xampp folder.

After extracting the xampp folder to your USB device double click on the xampp-control-3-beta.exe file and start Apache and MySQL.

Go to http://localhost and select your language and then exercise the demos to test your installation is working.

Post back after doing that and if you still get the Deactivated issue.

Good luck. :)

Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 05. October 2011 11:04
by getack
Thanks for the replies!

I do not want to use Xampp lite, as I want filezilla.

I tried the
Code: Select all
thing, it did not work.

I have the 7zip version that I am using. I checked Windows Services if anything was running, I stopped all components, I removed the Xampp folder and re-extracted it on the device. Still no cigar. It says deactivated, I get that error when I want to open phpMyAdmin and the demo's doesn't work either - "could not connect to database" error.

I mentioned the services thing because even if I install to a disk, run the setup batch file and install the services (ie NOT as a portable install), it still breaks. So it is not running it as portable that's breaking it.

One thing though. http://localhost never works for me. I always use Could this be one of the problems?


Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 05. October 2011 11:31
by Sharley
Is MySQL still running in green in the control panel.

Have you tried using the xampp-control-3-beta.exe instead of the older 2.5 version?
You can paste here the xampp-control-3-beta.log file from the xampp folder after you have started the CP3.

If you have ever installed MySQL before and it was installed as a Windows service but when you uninstalled you did not uninstall the MySQL Windows service then this could cause this issue - there may be a solution for this if this in fact is preventing MySQL from starting and to keep running.

Try this first;
Open xampp\phpmyadmin\config_inc.php file in your text editor and find this
Code: Select all
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
The entries should look like this.

Change the line with 'config' to 'cookie' then save the file and try again.

BTW did you add any passwords for MySQL or pma in the security menu item in the welcome page?

Good luck.:)

Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 05. October 2011 12:30
by getack
Not working :(

I did a total fresh install, so no chance of passwords being set or anything like that. Changing the "auth_type" to cookie takes me to a login page when I go to phpMyAdmin. When I enter 'root' and blank as a password, I get the same #2002 error:
Code: Select all
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

Thanks for your help!

Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 05. October 2011 12:35
by Sharley
See my last post as I have added some content while you were posting your last message.

Code: Select all
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
That error has a thousand possible solutions so this could take some time - copy that exact error message into a Google search and you will see what I mean.

First try this to get rid of possibly other MySQL services in the registry:
In the CP3 click on the Windows-Shell button and at the #command prompt type
sc delete mysql
hit enter and read the result.

Search your PC for any other my.ini files possibly in the Windows folder.

If you find any then rename them to something suitable like my_other.ini etc.

Now the socket issue, open the USB\xampp\mysql\bin\my.ini and change the lines I have marked in red and also remove all the quote marks " " from the paths as they are usually only required if a drive letter is used (you can add them again if MySQL complains) also I have added a space around the = sign ( may be easier to copy and paste the following) - make a backup copy before editing this file
# The following options will be passed to all MySQL clients
# password = your_password
port = 3306
socket = xampp/tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
port= 3306
socket = xampp/tmp/mysql.sock
basedir = /xampp/mysql
tmpdir = /xampp/tmp
datadir = /xampp/mysql/data
pid_file =
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
Save the file and restart MySQL, then try again to access phpMyAdmin and see if that gets a cigar. :D

Good luck.

Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 07. October 2011 08:24
Default instead you type http://localhost/xampp/
here you can click phpmyadmin
it works
good luck

Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 07. October 2011 23:18
by getack
Nope, nothing. Tomorrow I will download the .exe installer and install it on my machine. The portability is not as critical.

If it still breaks, I am going to throw my pc into the pool and fire up my Ubuntu laptop.

Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 08. October 2011 03:38
by hackattack142
One thing though. http://localhost never works for me. I always use Could this be one of the problems?

I doubt it is a problem but you can try opening the file "C:\Windows\System32\drivers\etc\hosts" and uncomment the line "# localhost"

I do not want to use Xampp lite, as I want filezilla

FileZilla is not included in the lite version because it has to be installed as a service to run by default. However, there is a command line switch i do not think the developers know about that bypasses this behavior and allows the server to be fully portable. This can be done by executing "C:\xampp\FileZillaFTP\FileZillaServer.exe -compat -start"

If you use the installer, make sure you do not install it to a location that has spaces in the path (ex. Program Files). I still believe the zip/7z version is better as some people have encountered issues with missing files or other anomalies while using the installer.

I still recommend you uncomment the
Code: Select all
from the "xampp/mysql/bin/my.ini" file (it shouldn't make things any worse) and make sure you restart the servers and either clear your browser cache or hit the "reload" button on the http://localhost/phpmyadmin link. I am also using Windows 7 SP1 64-bit and this is the only thing I need to do to get it to work each time after a fresh install.

Can you connect to the MySQL server manually by opening a command prompt (Start > Run > cmd) and running
Code: Select all
C:\xampp\mysql\bin\mysql.exe -uroot

The following also help some people with this problem:
You could try opening the "xampp/phpMyAdmin/" file and adding the lines
Code: Select all
$cfg['Servers'][$i]['socket'] = '/xampp/mysql/mysql.sock';
$cfg['Servers'][$i]['host'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
somewhere underneath the "$i++;" line.

Have you tried looking in the "xampp/mysql/data/mysql_error.log" for clues as to why MySQL was dying?

Have you look in the Windows Event Log (Start > Run > eventvwr), look under Windows Logs the Application for errors related to why it wasn't starting?

Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 09. October 2011 11:10
by getack
Hackattack your solution helped me some! I added those three lines you mentioned, and now I can get into phpMyAdmin!

It is still shown as Deactivated, and the CD Collection demo does not work? None of the logs give me any hint whatsoever.
mySQL does not die. The process remains there, it is just not responding or whatever.

I decided to try and run it on another machine. The same memory stick, the same 7zip archive. Everything seems to work! So I think I might just throw my dev PC into the pool like I threatened to do. I scoured every hard drive for anything mysql related. I was not able to find anything. I had mySQLworkbench installed one, could it be that? I usually develop online, so I never used xampp on this machine before.


Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 09. October 2011 11:43
by getack
Never mind!

My hosts file was broken. I have some funky modifications done to my hosts file, and the "# localhost" line was commented out. That's why only typing in worked.

In many of the config files in mysql, it looks for "localhost", and not Trying to launch mysql using the cmd and the -uroot flag I got an error stating that "localhost" is unknown or something. This gave it away.

I modified the hosts file, and Bob's your uncle, it worked! Even with a vanilla Xampp, no problems.

Thanks for all the suggestions and help and patience. Sorry for wasting your time.


Re: xampp 1.7.7 mySQL "deactivated"

PostPosted: 09. October 2011 12:18
by Sharley
Your welcome and thanks for the feed back and good news. 8)

Best wishes. :)