xampp 1.7.7 mySQL "deactivated" - [SOLVED]

Problems with the Windows version of XAMPP, questions, comments, and anything related.

xampp 1.7.7 mySQL "deactivated" - [SOLVED]

Postby getack » 04. October 2011 18:46

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 :(

Thanks!

Regards
getack
 
Posts: 6
Joined: 04. October 2011 18:26

Re: xampp 1.7.7 mySQL "deactivated"

Postby hackattack142 » 05. October 2011 00:01

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
 bind-address="127.0.0.1"
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.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: xampp 1.7.7 mySQL "deactivated"

Postby Sharley » 05. October 2011 00:04

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. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: xampp 1.7.7 mySQL "deactivated"

Postby getack » 05. October 2011 11:04

Thanks for the replies!

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

I tried the
Code: Select all
bind-address="127.0.0.1"
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 127.0.0.1. Could this be one of the problems?

Regards
getack
 
Posts: 6
Joined: 04. October 2011 18:26

Re: xampp 1.7.7 mySQL "deactivated"

Postby Sharley » 05. October 2011 11:31

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.:)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: xampp 1.7.7 mySQL "deactivated"

Postby getack » 05. October 2011 12:30

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!
getack
 
Posts: 6
Joined: 04. October 2011 18:26

Re: xampp 1.7.7 mySQL "deactivated"

Postby Sharley » 05. October 2011 12:35

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
[client]
# password = your_password
port = 3306
socket = xampp/tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port= 3306
socket = xampp/tmp/mysql.sock
basedir = /xampp/mysql
tmpdir = /xampp/tmp
datadir = /xampp/mysql/data
pid_file = mysql.pid
skip-external-locking
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
log_error="mysql_error.log"
bind-address= 127.0.0.1
Save the file and restart MySQL, then try again to access phpMyAdmin and see if that gets a cigar. :D

Good luck.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: xampp 1.7.7 mySQL "deactivated"

Postby rajiv.mm » 07. October 2011 08:24

Default http://127.0.0.1/xampp/ instead you type http://localhost/xampp/
here you can click phpmyadmin
it works
good luck
rajiv.mm
 
Posts: 1
Joined: 07. October 2011 08:17

Re: xampp 1.7.7 mySQL "deactivated"

Postby getack » 07. October 2011 23:18

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.
getack
 
Posts: 6
Joined: 04. October 2011 18:26

Re: xampp 1.7.7 mySQL "deactivated"

Postby hackattack142 » 08. October 2011 03:38

One thing though. http://localhost never works for me. I always use 127.0.0.1. 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 "# 127.0.0.1 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
bind-address="127.0.0.1"
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/config.inc.php" file and adding the lines
Code: Select all
$cfg['Servers'][$i]['socket'] = '/xampp/mysql/mysql.sock';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$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?
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: xampp 1.7.7 mySQL "deactivated"

Postby getack » 09. October 2011 11:10

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.

Regards
getack
 
Posts: 6
Joined: 04. October 2011 18:26

Re: xampp 1.7.7 mySQL "deactivated"

Postby getack » 09. October 2011 11:43

Never mind!

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

In many of the config files in mysql, it looks for "localhost", and not 127.0.0.1. 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.

Regards
getack
 
Posts: 6
Joined: 04. October 2011 18:26

Re: xampp 1.7.7 mySQL "deactivated"

Postby Sharley » 09. October 2011 12:18

Your welcome and thanks for the feed back and good news. 8)

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 99 guests