dbTalk Databases Forums  

same datadir for Windows 32, 64 and Linux - mysql 5.1

comp.databases.mysql comp.databases.mysql


Discuss same datadir for Windows 32, 64 and Linux - mysql 5.1 in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ricardo Pan
 
Posts: n/a

Default same datadir for Windows 32, 64 and Linux - mysql 5.1 - 05-04-2011 , 01:30 PM






Hello everyone,

I am using mySQL 5.1.56 community server.
my mySQL`s are installed in the network (not as service) in Windows and Linux versions.


I would like to use the same datadir for Windows and Linux.
For Windows I was able to use the same datadir for Windows 64 and 32 bits.

For Linux I have another datadir set, but I would like to use the same.

How could I do that?

In Windows I launch mySQL not as service, that means, in the command line from a BAT file.

tasklist /FI "IMAGENAME eq mysqld.exe" 2>NUL | find /I /N "mysqld.exe" >NUL
if "%ERRORLEVEL%" == "0" (echo mySQL Server is already running) ELSE (start mysqld --defaults-file="%USERPROFILE%\my.ini")

in the my.ini I have used the basic configuration, with
# Server Section
[mysqld]
max_allowed_packet=1G
innodb_file_per_table

In Linux I do the same, but from a shell script.
mysqld --basedir=$BASEDIR --datadir=$DATADIR --log-error=$LOG_ERROR --pid-file=$PID_FILE --socket=$SOCKET --port=$PORT --innodb-file-per-table --max_allowed_packet=1G &

Those variables are correctly set.

Everything is working fine, but I would like to use the same datadir for Linux and Windows. In Windows, I was able to use the same datadir.. but If I create a project in 32 bits, I must continue using it in 32 bits.

How could I do that?

Best regards,

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.