Operating System: Ubuntu 18.04
MySQL version: Ver 8.0.19 for Linux on x86_64 (MySQL Community Server - GPL)
My system is set-up so that Ubuntu is running on a 128gb SSD, with a separate 1TB SSD for storage. This system is dual-boot with Windows 10 Pro and Ubuntu 18.04. The storage drive is NTFS formatted.
I would like to move the MySQL datadir over to the storage drive, because my OS drive isn't big enough.
I've been following the tutorial on this URL: https://www.digitalocean.com/community/tutorials/how-to-move-a-mysql-data-directory-to-a-new-location-on-ubuntu-16-04
I've gotten to "Step 4 — Restarting MySQL" in the tutorial. Up to this point, I've followed everything to a T, no missed commas, forward slashes, etc. All done exactly as described (I've checked to make sure this is true numerous times)
When I enter the terminal command
sudo systemctl start mysql
I get the following output
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
Following this output, I enter the following command into the terminal
systemctl status mysql.service
and receive the following output
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-03-31 22:36:46 CDT; 38s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 7368 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Process: 7316 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 7368 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Error: 13 (Permission denied)
Mar 31 22:36:46 user-desktop mysqld[7368]: 2020-04-01T03:36:46.436713Z 0 [Warning] [MY-010091] [Server] Can't create test file /media/user/storage/mysql_datadir/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
Mar 31 22:36:46 user-desktop mysqld[7368]: 2020-04-01T03:36:46.436796Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 7368
Mar 31 22:36:46 user-desktop mysqld[7368]: 2020-04-01T03:36:46.439912Z 0 [Warning] [MY-010091] [Server] Can't create test file /media/user/storage/mysql_datadir/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
Mar 31 22:36:46 user-desktop mysqld[7368]: 2020-04-01T03:36:46.439923Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /media/user/storage/mysql_datadir/mysql/ is case insensitive
Mar 31 22:36:46 user-desktop mysqld[7368]: 2020-04-01T03:36:46.439961Z 0 [ERROR] [MY-013276] [Server] Failed to set datadir to '/media/user/storage/mysql_datadir/mysql/' (OS errno: 13 - Permission denied)
Mar 31 22:36:46 user-desktop mysqld[7368]: 2020-04-01T03:36:46.440049Z 0 [ERROR] [MY-010119] [Server] Aborting
Mar 31 22:36:46 user-desktop mysqld[7368]: 2020-04-01T03:36:46.440146Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19) MySQL Community Server - GPL.
Mar 31 22:36:46 user-desktop systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Mar 31 22:36:46 user-desktop systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 31 22:36:46 user-desktop systemd[1]: Failed to start MySQL Community Server.
Seeing that this was a permissions error (which should have been avoided using the -av tags when copying the original directory to the new drive) I entered in the following command to give open permissions to the entire drive.
sudo chmod a+rwx /media/user/storage/
to check the permissions I enter
ls -ls /media/user/storage/mysql_datadir
with output
total 12
12 drwxrwxrwx 1 root root 12288 Mar 31 02:45 mysql
I've also made sure the full file path to the new datadir is lowercase to avoid conflict between the two file systems.
I still cannot get MySQL to start.
I'd appreciate any help. Thank you in advance.
Edit:
namei -mo /media/user/storage/mysql_datadir
f: /media/user/storage/mysql_datadir
drwxr-xr-x root root /
drwxr-xr-x root root media
drwxr-x--- root root user
drwxrwxrwx root root storage
drwxrwxrwx root root mysql_datadir
Based on your post seems that you are having permission issue along with owner of the "data directory" must always be mysql.
STOP your mysql service if it's running.
Consider below example:
my.cnf looks:
#
# Original path change to avoid space issue on server
#
datadir=/var/lib/mysql
Now you change this datadir in your my.cnf file like:
#
# Original path change to avoid space issue on server
#
#datadir=/var/lib/mysql
datadir=/media/user/storage/mysql_datadir
After this check the permission:
cd /media/user/storage/mysql_datadir
ls -al
output:
drwxr-x--x 40 mysql mysql 4096 Mar 27 00:01 mysql
If this is not output then execute below command:
chmod -Rf 0751 /media/user/storage/mysql_datadir
chown -Rf mysql:mysql /media/user/storage/mysql_datadir
Finally
START your mysql service now.
I had the same problem/solution as Pratik, after following the instructions to define a new datadir in
/etc/mysql/mysql.conf.d/mysqld.conf
and
/etc/apparmor.d/usr.sbin.mysqld
I modified my fstab to mount to
/mnt
instead of
/media/[username]
and mysql start up without any errors. no additional permissions to set other than the mysql directory. My issue was on Ubuntu 18.04 must be something special about the /media mount point
I installed xampp on win7 and get this error when starting apache.
I unchecked skype and nothing changes.
How do I find what is using port 80? How do I fix this please.
I dont have another server running.
update this is the error. I click on start and get this problem
Error: Apache shutdown unexpectedly.
11:27:19 PM [Apache] This may be due to a blocked port, missing dependencies,
11:27:19 PM [Apache] improper privileges, a crash, or a shutdown by another method.
11:27:19 PM [Apache] Press the Logs button to view error logs and check
11:27:19 PM [Apache] the Windows Event Viewer for more clues
11:27:19 PM [Apache] If you need more help, copy and post this
11:27:19 PM [Apache] entire log window on the forums
The below link didnt help me
Why won't Apache start in XAMPP installation?
Here is the error log
[Sat Jun 07 22:36:53.823331 2014] [ssl:warn] [pid 6048:tid 236] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jun 07 22:36:54.084345 2014] [ssl:warn] [pid 6048:tid 236] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jun 07 22:36:55.240412 2014] [mpm_winnt:notice] [pid 6048:tid 236] AH00455: Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11 configured -- resuming normal operations
[Sat Jun 07 22:36:55.241412 2014] [mpm_winnt:notice] [pid 6048:tid 236] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:13:13
[Sat Jun 07 22:36:55.241412 2014] [core:notice] [pid 6048:tid 236] AH00094: Command line: 'E:\\xampp\\apache\\bin\\httpd.exe -d E:/xampp/apache'
[Sat Jun 07 22:36:55.339417 2014] [mpm_winnt:notice] [pid 6048:tid 236] AH00418: Parent: Created child process 1840
[Sat Jun 07 22:36:55.950452 2014] [ssl:warn] [pid 1840:tid 248] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jun 07 22:36:56.202467 2014] [ssl:warn] [pid 1840:tid 248] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jun 07 22:36:56.299472 2014] [mpm_winnt:notice] [pid 1840:tid 248] AH00354: Child: Starting 150 worker threads.
Try those methods, it should work:
quit/exit Skype (make sure it's not running) because it reserves localhost:80
disable Anti-virus (Try first to disable skype and running again, if it didn't work do this step)
Right click on xampp control panel and run as administrator
I had the same problem, I solved changing the ports.
-> Clicked button Config front of Apache.
1) Select Apache (httpd.conf)
2) searched for this line: Listen 80
3) changed for this: Listen 8081
4) saved file
-> Click Config button front of Apache.
1) Select Apache (httpd-ssl.conf)
2) searched for this line: Listen 443
3) changed for this: Listen 444
4) saved file
I can run xammp from port 8081
http://localhost:8081/
You have to give port number you gave to enter the localhost
Hope this helps you to understand what is happening.
I got the same error when xampp was installed on windows 10.
www.example.com:443:0 server certificate does NOT include an
ID which matches the server name
So I opened httpd-ssl.conf file in xampp folder and changed the following line
ServerName www.example.com:443
To
ServerName localhost
And the problem was fixed.
I think killing the process which is uses that port is more easy to handle than changing the ports in config files. Here is how to do it in Windows. You can follow same procedure to Linux but different commands.
Run command prompt as Administrator. Then type below command to find out all of processes using the port.
netstat -ano
There will be plenty of processes using various ports. So to get only port we need use findstr like below (here I use port 80)
netstat -ano | findstr 80
this will gave you result like this
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 7964
Last number is the process ID of the process. so what we have to do is kill the process using PID we can use taskkill command for that.
taskkill /PID 7964 /F
Run your server again. This time it will be able to run. This can uses for Mysql server too.
www.example.com:443:0 server certificate does NOT include an ID which matches the server name
I was getting this error when trying to start Apache, there is no error with Apache. It's an dependency error on windows 8 - probably the same for 7. Just right click and run as Admin :)
If you're still getting an error check your Antivirus/Firewall is not blocking Xampp or port 443.
After changing main port from 80 to 8080 you have to change the config in XAMPP control panel as I show in the images:
1)
2)
3)
Then restart the service and that's it !
Trying to configure apache/mercurial but running into the following error..
[Tue Aug 27 22:51:21 2013] [error] [client xxx.xxx.xxx.xxx] mod_wsgi (pid=32758): Target WSGI script '/var/www/vhosts/hg.xxxxx.net/cgi-bin/hgweb.wsgi' cannot be loaded as Python module.
[Tue Aug 27 22:51:21 2013] [error] [client xxx.xxx.xxx.xxx] mod_wsgi (pid=32758): Exception occurred processing WSGI script '/var/www/vhosts/hg.xxxxx.net/cgi-bin/hgweb.wsgi'.
replacing hgweb.wsgi with a hello world test script works as expected. All software is from CentOS repos.
Here is the traceback from error.log
[Tue Aug 27 22:57:59 2013] [error] Traceback (most recent call last):
[Tue Aug 27 22:57:59 2013] [error] File "/var/www/vhosts/hg.xxxxx.net/cgi-bin/hgweb.wsgi", line 14, in <module>
[Tue Aug 27 22:57:59 2013] [error] from mercurial import demandimport; demandimport.enable()
[Tue Aug 27 22:57:59 2013] [error] ImportError: No module named mercurial
The traceback is indicating that you do not have mercurial, (for python), installed on the server, you need the python bindings installed before your scripts can use it.
If you don't have admin rights then you will have to contact your administrator but otherwise you could try, on the server running:
sudo pip install mercurial
Update
There is an interesting blog post here on setting up mercurial on centos that suggests that you need to install and build the python mercurial bindings from source.
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.
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.