MySQL & environment variables problem
Posted by: tmdev (---.plastcom.pl)
Date: July 21, 2014 09:07PM

System version: Windows 7 x64
WampServer 2.5 (Apache : 2.4.9 MySQL : 5.6.17 PHP : 5.5.12)

After changing the location of "TEMP" system variable (Computer -> Properties -> Advanced system settings -> Advanced -> Environment Variables) from the system's partition to another one (different physical drives) i get the following error:

 #2002 - No connection could be made because the target machine actively refused it.

The WAMP icon is Orange because the MySQL service is not being started. Error log from /bin/mysql/.../data/*.err:
2014-07-21 19:54:54 3128 [Note] Plugin 'FEDERATED' is disabled.
2014-07-21 19:54:54 3128 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-07-21 19:54:54 3128 [Note] InnoDB: The InnoDB memory heap is disabled
2014-07-21 19:54:54 3128 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-07-21 19:54:54 3128 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-07-21 19:54:54 3128 [Note] InnoDB: Not using CPU crc32 instructions
2014-07-21 19:54:54 890  InnoDB: Error: unable to create temporary file; errno: 2
2014-07-21 19:54:54 3128 [ERROR] Plugin 'InnoDB' init function returned error.
2014-07-21 19:54:54 3128 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-07-21 19:54:54 3128 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-07-21 19:54:54 3128 [ERROR] Aborting

I have read the solutions mentioned in this thread - didn't work but after some investigation I figured out that the variable is causing the problem.

Changing the mentioned variable is a common practice when the system runs on SSD drive so the temporary files are being saved on HDD which increases the SSD's life time.

InnoDB is having issues with temporary files, so the question is: how can I get the WAMP services to work with relocated system's temporary files location?

Any ideas?



Edited 2 time(s). Last edit at 07/21/2014 09:11PM by tmdev.

Options: ReplyQuote
Re: MySQL & environment variables problem
Posted by: tmdev (---.plastcom.pl)
Date: July 22, 2014 12:04AM

Found the solution - adding tmpdir parameter with the new system temp location to the mysqld.exe service fixed the issue.

The parameter can be added by changing the path to wampmysqld64 service (regedit: HKLM\SYSTEM\CurrentControlSet\services\wampmysqld64: add in ImagePath after the file name):
...\mysqld.exe --tmpdir=X:/tmp wampmysqld64
where X:/tmp is the location set as TEMP in System environment variables.



Edited 1 time(s). Last edit at 07/22/2014 12:05AM by tmdev.

Options: ReplyQuote
Re: MySQL & environment variables problem
Posted by: Otomatic (Moderator)
Date: July 22, 2014 09:51AM

Hi,

As you have not read, nor replied to READ THIS BEFORE YOU ASK A QUESTION it was impossible to know that you have installed WampServer 64-bit.

So the answer is:
- In wamp/bin/mysql/mysql5.6.17/my.ini file replace
[wampmysqld]
by
[wampmysqld64]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.