wamp 2.5 can't change mysql datadir
Posted by: hpme (---.200.178.107.gae.googleusercontent.com)
Date: June 23, 2014 11:32AM

I installed wamp(WampServer Version 2.5 64bit),Apache : 2.4.9 MySQL : 5.6.17 PHP : 5.5.12 PHPMyAdmin : 4.1.14 SqlBuddy : 1.3.3 XDebug : 2.2.5.and after installed ,i modify D:\wamp\bin\mysql\mysql5.6.17\my.ini,

change datadir=d:/wamp/bin/mysql/mysql5.6.17/data to datadir=d:/wamp/bin/mysql/mysql5.6.17/data2
and copy D:\wamp\bin\mysql\mysql5.6.17\data to D:\wamp\bin\mysql\mysql5.6.17\data2,restart wamp.
but the datadir not change,what happend.

Options: ReplyQuote
Re: wamp 2.5 can't change mysql datadir
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: June 23, 2014 12:51PM

Hi hpme,


Strange, I just did exectly what you say you did and it worked perfectly. A new database and table I created were created in the new data2 folder.

Are you sure you used the unix forward slash rather that the dos backslash in the folder name?
Are you sure that you restarted the MySQL server wampserver->MySQL->Service->Restart service

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: wamp 2.5 can't change mysql datadir
Posted by: hpme (---.200.178.107.gae.googleusercontent.com)
Date: June 23, 2014 01:02PM

@RiggsFolly,thank you,
But which I downloaded is Wamp 64bit,from www.wampserver.com/en(my computer is Win7 x86_64)
I change datadir in my.ini but dont work (wamp 64bit).

Options: ReplyQuote
Re: wamp 2.5 can't change mysql datadir
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: June 23, 2014 01:16PM

Ahh

That could be relevant! Didn't spot that.

Well @Otomatic suggests the following and he uses 64bit:

Leave the datadir as it is and place a SYMLINK or in Windows Terminology a Junction in the .../data folder pointing to the location where you want the databases folder to live

The relevant thread is [forum.wampserver.com]


Hope this is of help.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: wamp 2.5 can't change mysql datadir
Posted by: hpme (---.200.178.107.gae.googleusercontent.com)
Date: June 24, 2014 04:45AM

But I found no matter how I edit the datadir in my.ini,even comment it, the datadir still point the default.
and if I delete the default data folder,Wamp(MySQL) cant restart.



Edited 1 time(s). Last edit at 06/24/2014 04:49AM by hpme.

Options: ReplyQuote
Re: wamp 2.5 can't change mysql datadir
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: June 24, 2014 10:56AM

OK,

I asked @Otomatic to test this, he uses 64bit wamp and this is his reply.



================From Otomatic ==============================

It works for me.
Wampserver 64 bit installed into J:\wamp64 with two versions of MySQL :
J:\wamp64\bin\mysql\mysql5.6.17\my.ini
J:\wamp64\bin\mysql\mysql5.6.19\my.ini

I switch to MySQL 5.6.17 and quit Wampserver.
I copy all files from:
J:\wamp64\bin\mysql\mysql5.6.17\data\
to
G:\wwwbasesoto\

(Thats the whole data folder including all these files)
g:\wwwbasesoto\mysql\
g:\wwwbasesoto\performance_schema\
g:\wwwbasesoto\test\
g:\wwwbasesoto\auto.cnf
g:\wwwbasesoto\ib_logfile0
g:\wwwbasesoto\ib_logfile1
g:\wwwbasesoto\ibdata1


I rename data folder of mysql 5.6.17 :
j:\wamp64\bin\mysql\mysql5.6.17\data_old\

I modify J:\wamp64\bin\mysql\mysql5.6.17\my.ini

#datadir= J:/wamp64/bin/mysql/mysql5.6.17/data
datadir=G:/wwwbasesoto


I launch Wampmanager 64 and MySQL works fine.

Do not copy or move only the folders (databases) mysql and performance_schema, you must also copy or move files auto.cnf, ib_logfile0, ib_logfile1 and ibdata1.
All folder and files from J:\wamp64\bin\mysql\mysql5.6.17\data\ must be copied.

=================================================================


I hope this identifies what you are doing wrong.

Regards

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: wamp 2.5 can't change mysql datadir
Posted by: pashkasan (88.135.84.---)
Date: June 25, 2014 03:46AM

the some problem here, datadir in my.ini dosn't work
wamp 2.5 win7 x64, mysql5.6.17

Options: ReplyQuote
Re: wamp 2.5 can't change mysql datadir
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: June 25, 2014 09:48AM

Can you check your my.ini file for me please.

Does the section header in that file say

[wampmysqld] or [wampmysqld64]


It should say [wampmysqld64] i.e. it should match the name of the service.

If it says [wampmysqld] then it is not being read by the service wampmysqld64 and that would explain the problem.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: wamp 2.5 can't change mysql datadir
Posted by: Otomatic (Moderator)
Date: June 25, 2014 07:20PM

Hi,

I try to explain where was the problem.

The MySQL documentation says about the file my.ini:
---------------
Empty lines in option files are ignored. Nonempty lines can take any of the following forms:

#comment, ;comment
Comment lines start with “#” or “;”. A “#” comment can start in the middle of a line as well.

[group]
group is the name of the program or group for which you want to set options. After a group line, any option-setting lines apply to the named group until the end of the option file or another group line is given. Option group names are not case sensitive.
If an option group name is the same as a program name, options in the group apply specifically to that program. For example, the [mysqld] and [mysql] groups apply to the mysqld server and the mysql client program, respectively.
----------------

So, for Wampserver 64 bits, the name of the program is wampmysqld64 i.e. the name of the service and, in my.ini file all the directives under the group [wampmysqld] are not taken into account because the program is not wampmysqld ; it is always the defaults values that are used.

After renaming the group with the actual name of the program that is to say the name of the service [wampmysqld64], things back to normal and directives will be taken into account.

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

Options: ReplyQuote
Re: wamp 2.5 can't change mysql datadir
Posted by: hpme (---.200.178.107.gae.googleusercontent.com)
Date: June 27, 2014 03:15PM

RiggsFolly Wrote:
-------------------------------------------------------
> Can you check your my.ini file for me please.
>
> Does the section header in that file say
>
> [wampmysqld] or [wampmysqld64]
>
>
> It should say [wampmysqld64] i.e. it should match
> the name of the service.
>
> If it says [wampmysqld] then it is not being read
> by the service wampmysqld64 and that would explain
> the problem.



Thank you very much ,now i changed the datadir successfully.
The correct way is replacing [wampmysqld] to [wampmysqld64]

Options: ReplyQuote


Sorry, only registered users may post in this forum.