MSQL: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
mSQL database is used by CODA to store configurations.
mSQL database is used by CODA to store configurations.
There is a plan to move to mySQL. To dimp mSQL following
There is a plan to move to mySQL. To dump mSQL following
command can be used:
command was used:


  msqldump -c clasrun > msqldump.sql
  msqldump clasrun > msqldump.sql
  mysql -h clondb1 -u clasrun daq_clasrun < msqldump.sql
  mysql -h clondb1 -u clasrun daq_clasrun < msqldump.sql


Observed problem: 'BONUS' and 'bonus' recognized by mySQL as identical key;
Observed problem: 'BONUS' and 'bonus' recognized by mySQL as identical key;
probably 'msqldump' must be modified to use VARCHAR() BINARY instead of CHAR().
To fix it 'msqldump' was modified to use VARCHAR() BINARY instead of CHAR()
Also, index is not defined ???
for primary keys. Some other changes were applied as well (see code).

Revision as of 11:38, 11 March 2008

mSQL database is used by CODA to store configurations. There is a plan to move to mySQL. To dump mSQL following command was used:

msqldump clasrun > msqldump.sql
mysql -h clondb1 -u clasrun daq_clasrun < msqldump.sql

Observed problem: 'BONUS' and 'bonus' recognized by mySQL as identical key; To fix it 'msqldump' was modified to use VARCHAR() BINARY instead of CHAR() for primary keys. Some other changes were applied as well (see code).