Apache, MySQL, and FTP 'Detected With Wrong Path' using XAMPP on Win7 - mysql

I'm having the following issues when trying to access XAMPP on my Win7. They are configured to start automatically when the OS is loaded. and the following message are what I see
6:25:17 AM [apache] Apache Service Detected With Wrong Path
6:25:17 AM [apache] Uninstall the service manually first
6:25:17 AM [mysql] MySQL Service Detected With Wrong Path
6:25:17 AM [mysql] Uninstall the service manually first
6:25:17 AM [filezilla] FileZilla Service Detected With wrong Path
6:25:17 AM [filezilla] Uninstall the service manually first
And the Apache error log is as follows:
[Sun Aug 19 06:24:16.719046 2012] [ssl:warn] [pid 1516:tid 384] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Aug 19 06:24:20.493262 2012] [mpm_winnt:notice] [pid 1516:tid 384] AH00455: Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4 configured -- resuming normal operations
[Sun Aug 19 06:24:20.494262 2012] [mpm_winnt:notice] [pid 1516:tid 384] AH00456: Server built: May 13 2012 14:10:15
[Sun Aug 19 06:24:20.494262 2012] [core:notice] [pid 1516:tid 384] AH00094: Command line: 'c:\xampp\apache\bin\httpd.exe -d C:/xampp/apache'
[Sun Aug 19 06:24:20.496262 2012] [mpm_winnt:notice] [pid 1516:tid 384] AH00418: Parent: Created child process 324
[Sun Aug 19 06:24:22.116354 2012] [ssl:warn] [pid 324:tid 288] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Aug 19 06:24:22.174358 2012] [mpm_winnt:notice] [pid 324:tid 288] AH00354: Child: Starting 150 worker threads.
And the MySQL error log
120819 6:24:18 [Note] Plugin 'FEDERATED' is disabled.
120819 6:24:19 InnoDB: The InnoDB memory heap is disabled
120819 6:24:19 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120819 6:24:19 InnoDB: Compressed tables use zlib 1.2.3
120819 6:24:19 InnoDB: Initializing buffer pool, size = 16.0M
120819 6:24:19 InnoDB: Completed initialization of buffer pool
120819 6:24:19 InnoDB: highest supported file format is Barracuda.
120819 6:24:21 InnoDB: Waiting for the background threads to start
120819 6:24:22 InnoDB: 1.1.8 started; log sequence number 4011253
120819 6:24:22 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
120819 6:24:22 [Note] - '0.0.0.0' resolves to '0.0.0.0';
120819 6:24:22 [Note] Server socket created on IP: '0.0.0.0'.
120819 6:24:27 [Note] Event Scheduler: Loaded 0 events
120819 6:24:27 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.25a' socket: '' port: 3306 MySQL Community Server (GPL)
Btw, editing is kind of hard here, having to do <br /> at every line

What that error message is indicating is that you have a MySQL Windows Service installed that is not part of the current XAMPP you are using (it detects the services by name then validates the service path). You indicated that you uninstalled a previous external MySQL installation. If this is the only other installation you are aware of on your system, it may not have automatically removed the service from Windows Services when it uninstalled.
If this is the case, you can do the following:
Open a command prompt (Start > Run > cmd) run as administrator
Type the following:
Code: Select all
sc delete mysql
and hit return. (Note: this requires admin privileges.)
If the second step completes successfully, you should be able to reopen the control panel and see what it then says. If all is well, you can install the MySQL Window Service for the XAMPP MySQL by clicking the red 'X' in the control panel that should be next to MySQL if all went well.

Just uncheck and check button in Module Services column. It will automatically delete old service and start new service with new path. It happens when you delete xampp folder directly without stopping services.

This answer is intended to supplement the one from Sarang. I just want to make clear, because it wasn't obvious to me, that it's possible to have an existing installation of MySQL and one tied to XAMPP running simultaneously. Here's how, along the same lines as Sarang's answer but hopefully with detail that provides extra useful guidance:
Run XAMPP Control Panel as administrator
Click MySQL/Config and change port to 3307 in two places
Stop MySQL service for existing installation
Run cmd.exe as administrator. Type "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqladmin"-u root -p shutdown. This will stop service for existing installation of MySQL
Back in XAMPP Control Panel, click on green check-mark next to MySQL: this will delete service for existing installation of MySQL
Click XAMPP Control Panel/Config and configure as below
Click Service and Port Settings and change port for MySQL to 3307 (I'm not sure if this is really necessary)
Quit XAMPP run again as administrator. This will start up Apache and MySql services
Run cmd.exe as administrator. Type "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --install. This will reinstall service for existing installation of MySQL
Open up Window Services. Start service for existing installation of MySQL

I was able to get it to work around this by running as administrator.

this is because you had installed apache seperately apart from the xampp apache.....
no worries.....
try the below steps it will resolve your issue
open cmd > run as administrator type the following commands
httpd -k shutdown
httpd -k stop
httpd -k uninstall
or
open powershell> run as administrator type the following commands
.\httpd -k shutdown
.\httpd -k stop
.\httpd -k uninstall
or
win + R
type services.msc
then find Apache24 or httpd
now open cmd > run as administrator
type sc delete "<your services name from the list for apache>"
thanks to the sources and contributors :)

Try looking at this post, it is very similar and it helped me fix my problems (delete previous installations of apache and mysql)
XAMPP on Windows - Apache not starting

Go to Command Prompt and Open it as a Administrator
just type
sc delete MySQL
and then
sc delete Apache2.4
Close the XAMPP and open it again.

Related

Mariadb doesn't starts. Control process Exited

I am trying to start mariadb with systemctl start mariadb also tried using sudo along.
This is what it says
Job for mariadb.service failed because the control process exited with
error code. See "systemctl status mariadb.service" and "journalctl
-xe" for details.
I saw this at many places but nothing helped.
It fails, I removed, installed again, nothing happened.
This is a part of /var/log/messages
Jun 17 18:03:09 controller systemd: Starting MariaDB 10.1 database
server...
Jun 17 18:03:09 controller mysqld: 2016-06-17 18:03:09 140477178509440
[Note] /usr/libexec/mysqld (mysqld 10.1.12-MariaDB) starting as process 120408 ...
Jun 17 18:03:12 controller systemd: mariadb.service: main process exited, code=exited, status=1/FAILURE
Jun 17 18:04:13 controller systemd: mariadb.service: control process exited, code=exited status=3
Jun 17 18:04:13 controller systemd: Failed to start MariaDB 10.1 database server.
Jun 17 18:04:13 controller systemd: Unit mariadb.service entered failed state.
Jun 17 18:04:13 controller systemd: mariadb.service failed.
I am really new to CentOS and mariadb, so I don't know how to proceed.
EDIT
The mariadb.log says
2016-06-17 19:24:39 140652810123392 [Note] Server socket created on IP: '::'.
2016-06-17 19:24:39 140652810123392 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use
2016-06-17 19:24:39 140652810123392 [ERROR] Do you already have another mysqld server running on port: 3306 ? 2016-06-17 19:24:39 140652810123392 [ERROR] Aborting
This is my my.cnf
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# This group is read by the server
#
[mysqld]
port=5555
bind-address = 10.23.77.68
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
I tried adding a line in my.cnf
port=5555
Didn't help, mariadb.log says the same thing as I have mentioned earlier.
I solved as follows:
After installing
Run: > mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/
Then: >mysql_secure_installation
And then: systemctl start mariadb
With this this, I can resolved.
Just remove following files at location
/var/lib/mysql
ib_logfile0
ib_logfile1
fuser -k 3306/tcp will solve the probem.
-k is to Kill processes accessing the file.

shows blank page after deploying a grails war file on openshift

i deployed a war file to openshift after creating a tomcat 7(JBoss EWS 2.0) app using the following guide lines (deploy war file using git)
but after deploying my app it only shows a blank page. here are the logs i got by using the rhc tail command.
==> app-root/logs/jbossews.log <==
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1571)
at net.sf.ehcache.util.concurrent.ConcurrentHashMap$ValuesView.iterator(
ConcurrentHashMap.java:3252)
at net.sf.ehcache.statistics.extended.ExtendedStatisticsImpl$1.run(Exten
dedStatisticsImpl.java:104)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
1)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:745)
==> app-root/logs/mysql.log <==
160420 10:20:46 InnoDB: highest supported file format is Barracuda.
160420 10:20:46 InnoDB: Waiting for the background threads to start
160420 10:20:47 InnoDB: 5.5.45 started; log sequence number 1595675
160420 10:20:47 [Note] Server hostname (bind-address): '127.9.179.2'; port: 3306
160420 10:20:47 [Note] - '127.9.179.2' resolves to '127.9.179.2';
160420 10:20:47 [Note] Server socket created on IP: '127.9.179.2'.
160420 10:20:47 [Warning] 'proxies_priv' entry '# root#ex-std-node563.prod.rhclo
ud.com' ignored in --skip-name-resolve mode.
160420 10:20:47 [Note] Event Scheduler: Loaded 0 events
160420 10:20:47 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld: ready for connec
tions.
Version: '5.5.45' socket: '/var/lib/openshift/571649900c1e669c5c00017c/mysql//s
ocket/mysql.sock' port: 3306 MySQL Community Server (GPL)
==> app-root/logs/phpmyadmin.log <==
[Tue Apr 19 11:24:41 2016] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured --
resuming normal operations
[Tue Apr 19 12:27:32 2016] [notice] SIGHUP received. Attempting to restart
[Tue Apr 19 12:27:32 2016] [notice] Digest: generating secret for digest authent
ication ...
[Tue Apr 19 12:27:32 2016] [notice] Digest: done
[Tue Apr 19 12:27:32 2016] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured --
resuming normal operations
[Wed Apr 20 10:20:38 2016] [notice] caught SIGWINCH, shutting down gracefully
[Wed Apr 20 10:21:05 2016] [notice] SELinux policy enabled; httpd running as con
text unconfined_u:system_r:openshift_t:s0:c4,c884
[Wed Apr 20 10:21:05 2016] [notice] Digest: generating secret for digest authent
ication ...
[Wed Apr 20 10:21:05 2016] [notice] Digest: done
[Wed Apr 20 10:21:05 2016] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured --
resuming normal operations
the name of the war file i deployed is ROOT.war using git push and it deployed successfully.i am using mysql database and phpmyadmin cartridges.
i just want to figure out why it is showing me a blank page when i try to access the url of my application.
thanks in advance.
The log you provided is not helpfull at all, because it's not full, I even can't see what exception was thrown.
This is the best article about deploying grails application on OpenShift, it will help you a lot:
Grails on Openshift
Also the troubleshoutting will be more productive if you use ftp to see what's going on on your server
Using FileZilla and SFTP on Windows with OpenShift
i have fixed the problem with the help i got from #Taras Kohut. i added the following lines to my BuildConfig.groovy file.
grails.project.war.exploded.dir = "/yourLocalPathToClonedOpenshiftFile/webapps/ROOT"
grails.war.exploded=true
the above lines will generate an exploded war file in your openshift app in the webapps folder.
next i added ROOT.war.deploy file again in the webapps directory.This is a file which instructs jboss that after the push it must take the ROOT folder and deploy it on Tomcat (which is emulated by JBoss) as if it was a war file.
after that i committed and pushed my changes and the app is deployed successfully and everything works fine.

Fail to move mysql's data directory

I'm trying to move the data directory of mysql, here are my steps:
use show variables like 'datadir' to know my datadir is /var/lib/mysql/
cd /var/lib/mysql/
# mv * /home/elderry/db/
gvim /etc/mysql/my.cnf
Add this line in [mysqld] section:
datadir = /home/elderry/db/
# systemctl start mysqld
Job for mysqld.service failed. See 'systemctl status mysqld.service' and 'journalctl -xn' for details.
Then I tried: systemctl status mysqld.service
Result:
mysqld.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled)
Active: activating (start-post) (Result: exit-code) since Tue 2013-07-30 14:31:53 CST; 13s ago
Process: 14174 ExecStart=/usr/bin/mysqld --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
Control: 14175 (mysqld-post)
CGroup: name=systemd:/system/mysqld.service
└─control
├─14175 /bin/sh /usr/bin/mysqld-post
└─14293 sleep 1
Jul 30 14:31:53 Kanone mysqld[14174]: 130730 14:31:53 [Warning] Can't create test file /home/elderry/db/Kanone.lower-test
Jul 30 14:31:53 Kanone mysqld[14174]: [71B blob data]
Jul 30 14:31:53 Kanone mysqld[14174]: 130730 14:31:53 [ERROR] Aborting
Jul 30 14:31:53 Kanone mysqld[14174]: 130730 14:31:53 [Note] /usr/bin/mysqld: Shutdown complete
Jul 30 14:31:53 Kanone systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE
If I want to start mysql manually: mysql -u root -p
output:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
What shoud I do for now?
It seems you moved the datadir to your home directory. I think that when you start mysqld via your service manager (in your case systemd) it will be started as an unprivileged user (most likely mysql). I strongly doubt that this user has privileges to access the homedir of the user elderry.
So the solution would either be moving your datadir to a more suitable location like /var/lib/mysql and chown this directory to the user under which mysql runs. Or that you give the mysql user privileges that he can acces the homedir of elderry.
When installing MariaDB, it creates user and group mysql automatically that own all data files, so if you move data dir, make sure that all folder, subfoler, files in new data directory are owned by user mysql and group mysql.
Also check if your partition is not full, which was my case.
For an unknown reason, moving the data to another partition did not work either.
So for a quick fix, instead of messing with llvm or gparted, I reduced my /swapfile size.

Wampserver icon not going green fully, mysql services not starting up?

I'm running an application on localhost, it's been running successfully for at least a year now, but suddenly today wampserver isn't starting up. Whenever I rightclick on the taskbar icon and "start all services", it gets orange, but never green. Yesterday there was a data loss problem because one of the mysql tables crashed and had to be repaired, if that's related to this in any way.
If I try http://localhost/phpmyadmin, I get a 403 Forbidden error, which I never got before.
I checked the apache log today and its latest entries are:
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP 2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:25, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in D:\\wamp\\www\\zeejflow\\index_exe.php on line 25, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP 2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:25, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: [2002] No connection could be made because the target machine actively (trying to connect via tcp://localhost:3306) in D:\\wamp\\www\\zeejflow\\index_exe.php on line 26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: No connection could be made because the target machine actively refused it.\r\n in D:\\wamp\\www\\zeejflow\\index_exe.php on line 26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in D:\\wamp\\www\\zeejflow\\index_exe.php on line 26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP Warning: mysql_num_rows() expects parameter 1 to be resource, integer given in D:\\wamp\\www\\zeejflow\\index_exe.php on line 34, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP 2. mysql_num_rows() D:\\wamp\\www\\zeejflow\\index_exe.php:34, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] an unknown filter was not added: DEFLATE
[Sat Jul 20 14:17:33 2013] [error] an unknown filter was not added: DEFLATE
[Sat Jul 20 14:17:33 2013] [error] an unknown filter was not added: DEFLATE
Lines 25 and 26 on index_exe.php are simply as below (I was trying to log in to the application):
$userName = mysql_real_escape_string($_POST['userName']);
$Password = mysql_real_escape_string($_POST['Password']);
Because of the [2002] No connection could be made because the target machine actively (trying to connect via tcp://localhost:3306 error, I figured maybe there's a problem with some other application using the same port, so I tried the following (my wamp is running on D:) :
C:\Users\admin>netstat
Active Connections
Proto Local Address Foreign Address State
TCP 127.0.0.1:5939 localhost127:49313 ESTABLISHED
TCP 127.0.0.1:5939 localhost127:49317 ESTABLISHED
TCP 127.0.0.1:49155 localhost127:49156 ESTABLISHED
TCP 127.0.0.1:49156 localhost127:49155 ESTABLISHED
TCP 127.0.0.1:49157 localhost127:49158 ESTABLISHED
TCP 127.0.0.1:49158 localhost127:49157 ESTABLISHED
TCP 127.0.0.1:49311 localhost127:49312 ESTABLISHED
TCP 127.0.0.1:49312 localhost127:49311 ESTABLISHED
TCP 127.0.0.1:49313 localhost127:5939 ESTABLISHED
TCP 127.0.0.1:49315 localhost127:49316 ESTABLISHED
TCP 127.0.0.1:49316 localhost127:49315 ESTABLISHED
TCP 127.0.0.1:49317 localhost127:5939 ESTABLISHED
TCP 127.0.0.1:49320 localhost127:49321 ESTABLISHED
TCP 127.0.0.1:49321 localhost127:49320 ESTABLISHED
TCP 192.168.15.200:49166 server6201:5938 ESTABLISHED
TCP 192.168.15.200:49847 Server-PC:netbios-ssn TIME_WAIT
TCP 192.168.15.200:49848 Server-PC:netbios-ssn TIME_WAIT
D:\>netstat
Active Connections
Proto Local Address Foreign Address State
TCP 127.0.0.1:80 localhost127:49799 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49800 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49801 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49802 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49803 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49804 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49806 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49810 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49811 TIME_WAIT
TCP 127.0.0.1:5939 localhost127:49313 ESTABLISHED
TCP 127.0.0.1:5939 localhost127:49317 ESTABLISHED
TCP 127.0.0.1:49155 localhost127:49156 ESTABLISHED
TCP 127.0.0.1:49156 localhost127:49155 ESTABLISHED
TCP 127.0.0.1:49157 localhost127:49158 ESTABLISHED
TCP 127.0.0.1:49158 localhost127:49157 ESTABLISHED
TCP 127.0.0.1:49311 localhost127:49312 ESTABLISHED
TCP 127.0.0.1:49312 localhost127:49311 ESTABLISHED
TCP 127.0.0.1:49313 localhost127:5939 ESTABLISHED
TCP 127.0.0.1:49315 localhost127:49316 ESTABLISHED
TCP 127.0.0.1:49316 localhost127:49315 ESTABLISHED
TCP 127.0.0.1:49317 localhost127:5939 ESTABLISHED
TCP 127.0.0.1:49320 localhost127:49321 ESTABLISHED
TCP 127.0.0.1:49321 localhost127:49320 ESTABLISHED
TCP 192.168.15.200:49166 server6201:5938 ESTABLISHED
TCP 192.168.15.200:49805 mrs02s05-in-f4:http ESTABLISHED
But now I don't know what to make of this. I made sure my.ini had specified port 3306, and it had (anyway noone changed it in a year how could it suddenly have another value). Any help please! I think Apache is working because when I type in http://localhost, it works and gives the option to go to phpmyadmin or my application folder, but it appears mysql services aren't starting up or something? I confirmed with the admin and no new software (such as Skype) have been installed or anything.
Update
I went to Services.msc and checked wampapache, the status was "started".
But wampmysqld had no status. So I right-clicked and chose "Start".
A message said "Windows is attempting to start the service on the local computer", but then I got this error:
Windows could not start the wampmysqld service on Local Computer
Error 1067: The process terminated unexpectedly
What on earth is up? :(
Update 2
I got the mysql working again, here:
mysqld working but wampmysqld not starting up
HowEVER, localhost://phpmyadmin still gives me a 403 forbidden error, and mysql_connect keeps giving me an "Access denied" error.
Go to: wamp\bin\mysql\mysql5.6.17\data and delete the following:
auto.cnf, xxxxxxxxx.err, xxxxxxxxx.pid, ib_logfile0 and ib_logfile1
leave other file as it is.
if it is skype that is occupying your port 80 then go to skype: tools>option and in advance>connection uncheck "use port 80 and 443......"
This happened to me today. Since I had not changed my system setting since yesterday, I assumed it's predominantly a mysql issue on the system. I managed to fix it in the following way.
Open wampserver's mysql log file. This will contain information on why the service threw and error and exited prematurely.
In my case, the mysql service failed to start because it could not read a certain tablespace. The specific tablespace was indicated in the log.
Failure to read such a file could be because of file permissions or the file being broken. In such a case, mysql stops executing in order to avoid damaging a tablespace file that may be linked to a database you need. Usually, if you have a backup of the database, then it is safe to simply delete this problematic file and restore the database once your mysql service is started again.
If you do not have a database backup then you could force the mysql instance to run a recovery by enabling the option in your my.cnf / my.ini file.
innodb_force_recovery = 1
This forces the instance to run the crash recovery.
NOTE: installing a new instance of mysql does not necessarily mean that your databases shall be retained. I suggest you run a nightly backup of your databases if you are working on huge projects.
I had the same issue, to resolve it I added the following line to my.ini
innodb_force_recovery = 1
I was running Wamp Server for more than a year,
Now I faced a problem that I couldn't start Wamp server (The icon just stay red and the error message appear)
I managed to uninstall Wamp and reinstall it again, and so I did, but before that I copied the folder from mysql/data to my desktop then when I reinstall it I copied that files to the original location.
Then mysql just got confused... And phpmyadmin is not working so I fixed that by restoring the fresh install folder contents..
But I couldn't start mysql (the wamp servers icon still on yellow)
So after I googled a lot, I deleted every thing in the mysql/data except for:-
mysql
test
performance_schema
And my problem solved :)
I had this same problem...
WampServer has been running fine since Feb on my local dev server. Today I couldn't get it to run.
Off to google where I found this page and found no answers until I saw the last entry:
"1.Run WampServer: Apache->service->test port 80.
2.Find out application which occupation port 80(e.g. skype)"
So did and it returned that Skype was possibly blocking port 80.
Turned off Skype and the problem was solved.
I had the same problem. Mysql didn't start.
go to services.
right click the wampmysqld go to properties.
startup type select manual.
right click and click start service.
worked for me.
-Go to Task Manger
-End all task instances of mysql
-restart your wampserver
For me, adding innodb_force_recovery=3 to my.ini solved the issue
Another option is removing ibdata files and all ib_logfile from the data directory , as explained in MySQL docs here. However this will cause any innoDB tables not to work(because the some information stored in ibdata1)
You may want to reset data from MySQL
delete previous data from C:\wamp\bin\mysql\mysql5.6.17\data
restart service
Delete everything from this file.
C:\wamp\bin\mysql\mysql5.1.36\data\mysql-bin.index
Restart mysql server and it should work.
I opened up services.msc from the command prompt and disabled SQL Server reporting services
& SQL Server analysis services. These services were using port 80.
Then I restarted WAMP Server and it started working properly as before.
I have uninstalled the WampServer completelly, and deleted all files in /wamp folder, except www. This folder is preserved when uninstalling. After that I've installed it again and it works fine.
Important: This is helpful only in case when you already have your database backed up. All data from the database will be wiped out this way.
Delete everything from this file.
C:\wamp\bin\mysql\mysql5.1.36\data\mysql-bin.index
It works for me. My wamp server has turned green. Tnx a lot
Click on wamp (Yellow) icon
Go Apache-> Service-> Test port 80. If port is available to use
then go to Apache->Service-> Install Service
then click on Restart All Services.
Have you tried just changing the port number of MySQL and see if it works?
Right click your WAMP icon
Choose MySQL, in the menu choose "Use a port other than 3306"
Change port number to be "3307"
I've got a very similar problem, after a lot trying even the solutions in this question I concluded with THIS OTHER ANSWER.
I didn't replicated it here because it is NOT A CORRECT THING TO DO.
Basically is about re-installing MySQL (or the entire package) being sure to delete very well the old my-sql-data very well (back it up if you might need it) and stick on using 32 bit versions.
simplest this to do is find what other service is using the same service id as mysql does in windows.
When i looked through the list of services running on my pc (even after a restart...i still had the problem)
I quickly realised i had webmatrix installed on my computer previous to wamp server...webmatrix installed its own copy of mysql and set it to automatically startup another instance each time i logged in.
As soon as the other instance of mysql associated with web matrix was stopped (and changed from automatic startup to manual) my problem with WAMP mysql was solved.
I was running on the same problem, wampmysqld64 did not start, so I checked the Mysql log which you should find it inside the main wamp64 folder, and I found all the details on why is not working. on my computer I found another mysql instance is running so it prevents the wampmysqld64 to start. I stopped the other instance, and everything works fine after.
I have solved my problem just by following below steps:
On windows platform press WINDOWS + R
Put services.msc and press OK
Stop already running MySQL and
Go to Wamp and start/resume MySQL service
All the best
Click on wampserver icon then -> Apache -> httpd.conf -> search listen here you will find port number like this #Listen 12.34.56.78:80
Listen 80 change this port number with any other number like Listen 12.34.56.78:81 save this and now restart all servers it gets green to orange.
I had the same probelm for the past 3 days. Try this. It will definitely work.
BEFORE proceeding with the installation of Wampserver, you must ensure that certain elements are installed on your system, otherwise Wampserver will absolutely not run, and in addition, the installation will be faulty and you will need to remove Wampserver BEFORE installing the elements that were missing.
Uninstall wamp and download and Install microsoft visual c++ redistributable 2008 (https://www.microsoft.com/en-in/download/details.aspx?id=29), microsoft visual c++ redistributable 2012 (https://www.microsoft.com/en-in/download/details.aspx?id=30679), microsoft visual c++ redistributable 2015 (https://www.microsoft.com/en-in/download/details.aspx?id=48145). Now, reinstall wamp and it should work fine.
Wow.. This works for me. Unistall the wamp server
Make sure this dependencies are successfully installed Microsoft Visual C++ Redistributable Packages vcredist_Allversions(x32 orx64) depending on your OS.
Reinstall the wamp server and you are good to go. Thank you
Run WampServer: Apache->service->test port 80.
Find out what application which occupies the port 80(e.g. skype)
Shut down and restarts WampServer.
Basically this happens when you have not installed pre required software installed on your machine while installing Wampserver you might have got error bellow error at the time of installation.
program can't start because msvcr120.dll is missing OR
program can't start because msvcr120.dll is missing
If you fixed those issue after the installation of wampserver then you might get stuck at this problem.
Then You can simply uninstall and install wamp server again
And If you have not install pre required dependency then first of all uninstall wampserver . And then install pre requirement first and then finally you can install Wampserver and it should work now.
you can download Pre-required applications from following link
For x64 Machines
microsoft visual c++ 2010 redistributable package (x64) https://www.microsoft.com/en-in/download/details.aspx?id=14632
Visual C++ Redistributable for Visual Studio 2012 Update 4 https://www.microsoft.com/en-in/download/details.aspx?id=30679
Visual C++ Redistributable Packages for Visual Studio 2013 https://www.microsoft.com/en-in/download/details.aspx?id=40784
Visual C++ Redistributable for Visual Studio 2015
https://www.microsoft.com/en-in/download/details.aspx?id=48145
For x86 Machines
Microsoft Visual C++ 2010 Redistributable Package (x86)
https://www.microsoft.com/en-in/download/details.aspx?id=14632
Visual C++ Redistributable for Visual Studio 2012 Update 4 https://www.microsoft.com/en-in/download/details.aspx?id=30679
Visual C++ Redistributable Packages for Visual Studio 2013 https://www.microsoft.com/en-in/download/details.aspx?id=40784
Visual C++ Redistributable for Visual Studio 2015
https://www.microsoft.com/en-in/download/details.aspx?id=48145
Note:- Take backup of your project files before uninstall
My problem was that wampmysqld64 service was disabled, so I went to:
task manager > services > right click on wampmysqld64 and then properties, another window is gonna open, look for wampmysqld64 service then right click and then click on properties and a window is gonna pop up:
On "Startup type" just change it from disabled to automatic, then go back click on the service and run it and that's it wamp logo it's gonna turn green.

Trouble running mysql on OSX 10.6 development machine: "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"

I've installed MySQL on my personal/development machine using the .dmg package, according to the instructions here: http://dev.mysql.com/doc/refman/5.5/en/macosx-installation-pkg.html including installing the startup item and the preferences pane. And yet, I can't seem to use MySQL at all.
running:
/Library/StartupItems/MySQLCOM/MySQLCOM start
or
/Library/StartupItems/MySQLCOM/MySQLCOM restart
"appears" to work -- in that, it gives me a message like "Starting MySQL database server" -- but afterward, I still can't go into mysql at the command-line, or connect to it in a Rails 2.3.8 application running in script/server. I get the error denoted in the question title.
Also, the MySQL preferences pane doesn't seem to work either. If I click the "Start MySQL Server" button, I'm asked for my password, but then nothing happens -- the pane continues to say that the server is stopped.
(I believe I had a MacPorts version of MySQL installed previously, and it's also possible that there was one built from source at some time in the past -- but I'm reasonably sure I've uninstalled these and deleted all the files having to do with it that I could find.)
I'm also trying mysqld start in terminal. here's the output:
110127 15:40:28 [Warning] Can't create test file /usr/local/mysql-5.5.8-osx10.6-x86_64/data/Lucky-Charm.lower-test
110127 15:40:28 [Warning] Can't create test file /usr/local/mysql-5.5.8-osx10.6-x86_64/data/Lucky-Charm.lower-test
110127 15:40:28 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
110127 15:40:28 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
110127 15:40:28 InnoDB: Initializing buffer pool, size = 128.0M
110127 15:40:28 InnoDB: Completed initialization of buffer pool
110127 15:40:28 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
Tried following the message about running mysql_upgrade but that just gives me my original error again.
UPDATE:
OK I've been pursuing the theory that it's a permissions problem. Seeing that the datadir was owned by root, I chown -R it to _mysql. In response to Mike, here's where that now stands:
$ ls -al /usr/local/mysql-5.5.8-osx10.6-x86_64
total 296
drwxr-xr-x 16 root wheel 544 Dec 3 12:53 .
drwxrwxr-x 12 root staff 408 Jan 27 14:38 ..
-rw-r--r-- 1 root wheel 17987 Dec 3 11:58 COPYING
-rw-r--r-- 1 root wheel 12388 Dec 3 11:58 INSTALL-BINARY
-rw-r--r-- 1 root wheel 113534 Dec 3 11:58 README
drwxr-xr-x 44 root wheel 1496 Dec 3 12:53 bin
drwxr-xr-x 9 _mysql wheel 306 Jan 27 16:46 data
drwxr-xr-x 4 root wheel 136 Dec 3 12:53 docs
drwxr-xr-x 47 root wheel 1598 Dec 3 12:53 include
drwxr-xr-x 12 root wheel 408 Jan 27 14:38 lib
drwxr-xr-x 4 root wheel 136 Dec 3 12:53 man
drwxr-xr-x 19 root wheel 646 Jan 27 14:38 mysql-test
drwxr-xr-x 3 root wheel 102 Dec 3 12:53 scripts
drwxr-xr-x 32 root wheel 1088 Dec 3 12:53 share
drwxr-xr-x 28 root wheel 952 Dec 3 12:53 sql-bench
drwxr-xr-x 16 root wheel 544 Dec 3 12:53 support-files
I was trying to do mysqld start in the Terminal because it was the only thing giving me anything that seemed like meaningful error message output (see https://gist.github.com/799436) but I'm told by folks in #mysql that that's not intended to be run directly (and if I try sudo mysqld start i get a message bitching me out for trying to run mysql as root).
I seem to have something working now: mysqld_safe & successfully gets a MySQL server running. What still doesn't work is the "normal" method of starting up the server (the Startup Item or Preferences Pane)
... leading someone in #mysql to tell me that apparently MySQL is fine, it's the startup item that's borked.
Ok there were several things, mostly having to do with permissions/ownership, that were tried to make the binary-installed MySQL work nicely.
You may need to make sure that the startup item is owned by root:
sudo chown -R root:wheel /Library/StartupItems/MySQLCOM
Maybe you need a /etc/my.cnf file with this in it:
[mysqld]
socket=/tmp/mysql.sock
datadir=/usr/local/mysql/data
You might need to fill in these variables in /usr/local/mysql/support-files/mysql.server (the line will be there with blank values):
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
(see can't start MySql in Mac OS 10.6 Snow Leopard regarding the above)
That may be enough to do it, but if not, try making sure the mysql user (_mysql) can write to the data directory (owns it and has write permissions to everything in it).
Anyway, now the Preferences Panel and Startup Item actually seem to work for me.
After going over this a second time on another machine, I've made some edits and removed some unnecessary bit from what I answered yesterday.
Overall here's what I suggest you do to get the binary-installed MySQL working nice in OSX 10.6. Warning, you might end up deleting any databases you already had in the first couple steps, but as this is intended to be for your development machine, that shouldn't be any big deal. Back stuff up with mysqldump first if you must.
Make sure you don't have a mysql server running right now: ps aux | grep mysql will show you their processes. Stop it with mysqladmin shutdown or if that won't work because something is borked, sudo kill the process numbers.
Remove any prior installed versions of mysql -- check port list installed, check for a homebrew-installed one, sudo find / -name mysql looking for compiled-from-source ones and delete them, whatever it takes. You could even remove the startup item by deleting the /Library/StartupItems/MySQLCOM directory if you want.
Run the mysql-whatever-version.pkg install package
Test it by typing sudo mysqld_safe & at the terminal. If you get "command not found," add /usr/local/mysql/bin to your path and try again. If you get any scary error messages, check for a /etc/my.cnf file as described above and try again. If it still doesn't work, then maybe try recursively chowning and chmoding the /usr/local/mysql/data directory to make sure _mysql can write to it. Once you get it to appear to start up OK, enter mysql at terminal. If you get a MySQL command prompt, all is well (enter exit to get out of it) -- in fact, if you get anything other than the ol' "Can't connect to local MySQL server through socket" then you can conclude that the MySQL server works -- shut down or kill the server and move on.
Next we'll install the startup item. Run MySQLStartupItem.pkg
Test the startup item at the terminal by entering sudo /Library/StartupItems/MySQLCOM/MySQLCOM start. It will give you a message claiming that it is starting up the server, but if it's unsuccessful it won't give you any indication, so try going into mysql again to test that the server is running. If so, enter sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop to stop the server (and to test that the startup item can stop the server as well as start it :D) If it didn't work, try making the settings described above in /usr/local/mysql/support-files/mysql.server. If that still doesn't do it, try the bit up at the top about sudo chown -R root:wheel /Library/StartupItems/MySQLCOM.
Once that works, run/install the MySQL.prefPane. This should give you a MySQL item in your System Preferences near the bottom, and if you go in there, you should see a button that you can click which will stop/start the MySQL server. Try it, and if it doesn't work by now, I'm not sure what else I can tell you.
I had experienced the same error after removing my old mac ports and installing mysql in a new mac ports directory ( a new /opt/local ).
I fixed it by setting the correct permissions for the mysql directories in the ports tree:
chown -R _mysql:_mysql /opt/local/var/db/mysql5
chown -R _mysql:_mysql /opt/local/var/run/mysql5/
chmod -R 755 /opt/local/var/run/mysql5
I'm not sure if the chmod was needed. Of course ports had already done the job of creating the _mysql user and group.