0

When I start WampServer 2.4 the MySQL instance does not start.

One day it works fine, the next day there was this issue.

I have tried restarting all services, include "innodb_force_recovery = 1" in my.ini and I removed the skip-innodb also in my.ini.

I get the following error:

2014-04-28 16:06:51 4408 [Note] Plugin 'FEDERATED' is disabled.
2014-04-28 16:06:51 13dc InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2014-04-28 16:06:51 4408 [Note] InnoDB: The InnoDB memory heap is disabled
2014-04-28 16:06:51 4408 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-04-28 16:06:51 4408 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-04-28 16:06:51 4408 [Note] InnoDB: Not using CPU crc32 instructions
2014-04-28 16:06:51 4408 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2014-04-28 16:06:51 4408 [Note] InnoDB: Completed initialization of buffer pool
2014-04-28 16:06:51 13dc  InnoDB: Operating system error number 3 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
2014-04-28 16:06:51 13dc  InnoDB: File name C:\mysql\data\ibdata1
2014-04-28 16:06:51 13dc  InnoDB: File operation call: 'create' returned OS error 103.
2014-04-28 16:06:51 13dc  InnoDB: Cannot continue operation.

I have searched for both Operating system error number 3 and OS error 103 and I cannot find an answer for the problem.

I got the ibdata1 file, but since I got data in my databases, I do not want to delete it and let WampServer recreate it.

It is not possible to log on to phpMyAdmin, but I can access the Localhost.

Also, I am pretty sure I have not changed anything in the folder structure.

MatthiasA
  • 381
  • 4
  • 11
  • I think you misunderstood. I haven't done anything. I closed the program one day while it was working fine, the next day it doesn't start, and I have not touched the PC in the meantime. – MatthiasA Apr 28 '14 at 14:54
  • [Looks like this, perhaps](http://stackoverflow.com/questions/3907666/mysql-wont-start-ibdata1-corrupt-operating-system-error-number-13-permis), Has the file permissions changed for the dir – Lawrence Cherone Apr 28 '14 at 15:01
  • I have not changed the permissions. I also just double checked, and it looks like it is the same. All folders have the same permissions. edit: Also, it is not the same error. – MatthiasA Apr 28 '14 at 15:13
  • This `C:\mysql\data\ibdata1` is not the location of the WAMPServer MySQL InnoDB databases. It looks like you have installed another MySQL or something you have installed came with its own MySQL Server. Check if you have more than one MySQL service running, wampservers is called `wampmysql`. – RiggsFolly Apr 28 '14 at 22:50
  • I installed a MySQL Server before the WampServer, and before it was not a problem. Right now, I have `wampmysqld` and `MySQL1` as running services. – MatthiasA Apr 29 '14 at 05:28

4 Answers4

0

MySQL server by default accepts connections from tpc port 3306.

So both your MySQL Server's are trying to use the same port THATS NOT ALLOWED so which ever MySQL server starts second will FAIL because it cannot get access to port 3306.

As WAMPServers MySQL Server is configured to only start on a manual request, and the other MySQL server is probably set to start `Automatically at boot WAMPServers MySQL will never start.

Option 1

You only need ONE MySQL server to run hundereds of seperate databases, so uninstall the other MySQL server after backing up any databases. Then restore the databases to the MySQL Server that comes with WAMPServer.

Option 2

Change the port that one of your MySQL Servers uses from 3306 to 3307. Then you can run 2 MySQL Servers on the same machine. And of course have twice the memory overhead.

If you change the WAMPServer MySQL Server config you have to do this:

Edit the \wamp\bin\mysql\mysqlx.y.z\my.ini file Change every reference to port 3306 to 3307.

Edit the PHP.INI file ( use the WAMPManager menus to ensure you are editing the correct file).

Change this line so that PHP knows you have moved MySQL to another port

mysqli.default_port = 3306

To

mysqli.default_port = 3307

Possible issues you may have When installing MySQL server manually it often places its my.ini or my.cnf into the C\WINDOWS\ folder structure. This is a pain as that one my.ini will then be picked up and used by any MySQL server running on your machine, by virtue of the search order MySQL uses to find it's ini file.

If this is the case on your system, you will have to move that file back into the folder structure of the other (non WAMPServer) MySQL Server install.

In short its much simpler to have only one MySQL Server installed on your system, at least until you become more familiar and experienced with MySQL Server and its operation.

YOUR SECOND ISSUE

2. Warning from MySQL, Event Id 100 - "TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option

Edit your my.ini and add this line in the [wampmysqld] section.

[wampmysqld]
explicit_defaults_for_timestamp
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • I think this solution is on the right pass. I just uninstalled MySQL Server, but the MySQL instance from WAMPServer still does not start. – MatthiasA Apr 29 '14 at 13:48
  • Check for my.ini files that exists anywhere outside the `\wamp\...` folder structure and remove them. Also check the Windows Event Viewer` for message from MySQL. It writes errors here if it has not yet opened the `mysql error log` – RiggsFolly Apr 29 '14 at 13:54
  • I just searched for my.ini files, and there was nothing but in the wamp folder. Before I uninstalled the MySQL Server, there was a notification telling me, that it had found 2 MySQL Instances but 0 was running. I tried to start the non-wamp MySQL Instance but it wouldn't either. Does this mean anything? – MatthiasA Apr 29 '14 at 15:31
  • What do you see in Window Event log? or the mysql error log? – RiggsFolly Apr 29 '14 at 17:00
  • I can't find any message in Windows Event Viewer specific to MySQL. If there should be one, where is it? The MySQL log is the exact same as before. It is still the "can't find file problem". – MatthiasA Apr 29 '14 at 17:38
  • Well if it is still looking for `C:\mysql\data\ibdata1` then there is either another MySQL running or the my.ini/my.cnf file is still confusing things – RiggsFolly Apr 29 '14 at 18:26
  • I just found something related to MySQL. Every time I try to start WampServer there comes two posts in the Event Viewer. 1. Error from the Service Control Manager, Event Id 7034 - "The Service wampmysqld unexpectedly ended/closed. This happened 2 times" 2. Warning from MySQL, Event Id 100 - "TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details)." I have translated 1. manually, since it was in danish, so the message is not the exact copy of what was in the message. – MatthiasA Apr 29 '14 at 19:42
  • See second issue section of my answer. – RiggsFolly Apr 30 '14 at 10:06
  • It definitely worked for the Warning from MySQL: But I still get the Error with Event Id 7034, and the service still does not start :/ I can't work on my website applications because of this. Do you think it happened because of an update? – MatthiasA Apr 30 '14 at 15:04
  • I just reinstalled WampServer and the problem was gone, until I uncommented all the lines in my.ini to enable InnoDB. It is still the same error happening, but the problem is caused by using InnoDB. It worked totally fine before. – MatthiasA May 01 '14 at 14:04
0

I tell you a really simple but good trick. Go to your data folder(in wamp: wamp->bin->mysql->mysqlx.x.x->data. Leave the three default files (performance_schema,test,mysql) in the folder and move all other files to another folder. Than restart all services. This time you notice that the icon will turn green. Now move back all the folders ,and not the files, to the data folder, notice to not move the files and just the folders. Restart your mysql service again and the files will be auto created and everything will work as expected.

DevMan
  • 538
  • 1
  • 5
  • 25
0

Resolved

I just wanted to let everyone know, that I don't have this problem any longer.

The problem was caused by enabling InnoDB.

The problem disappeared wheh I reinstalled WampServer, and after that I was able to enable InnoDB with no problem at all.

scott_lotus
  • 3,171
  • 22
  • 51
  • 69
MatthiasA
  • 381
  • 4
  • 11
0

I tried all the solutions and this is the one that worked for me:

  1. Right click your WAMP icon
  2. Choose MySQL, in the menu choose "Use a port other than 3306"
  3. Change port number to be "3307"

It should turn into green.

Amgad
  • 169
  • 2
  • 7