MSQL: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
mysql -h clondb1 -u clasrun daq_clasdev < clasdev.sql | mysql -h clondb1 -u clasrun daq_clasdev < clasdev.sql | ||
NOTE: | NOTE: databases 'daq_clasrun' and 'daq_clasdev' must be created and user 'clasrun' must have an appropriate privileges to access those databases (normally 'ALL_PRIVILEGES'). It can be useful to re-create entire database before filling it up, for example: | ||
mysql -h clondb1 -u clasrun | |||
mysql> drop database daq_clasrun; | |||
mysql> create database daq_clasrun; | |||
mysql> exit | |||
Observed problem: 'BONUS' and 'bonus' recognized by mySQL as identical key; | Observed problem: 'BONUS' and 'bonus' recognized by mySQL as identical key; | ||
To fix it 'msqldump' was modified to use VARCHAR() BINARY instead of CHAR() | 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). | for primary keys. Some other changes were applied as well (see code). |
Latest revision as of 13:11, 13 June 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 (in release 2.1 only !!!):
msqldump clasrun > clasrun.sql msqldump clasdev > clasdev.sql mysql -h clondb1 -u clasrun daq_clasrun < clasrun.sql mysql -h clondb1 -u clasrun daq_clasdev < clasdev.sql
NOTE: databases 'daq_clasrun' and 'daq_clasdev' must be created and user 'clasrun' must have an appropriate privileges to access those databases (normally 'ALL_PRIVILEGES'). It can be useful to re-create entire database before filling it up, for example:
mysql -h clondb1 -u clasrun mysql> drop database daq_clasrun; mysql> create database daq_clasrun; mysql> exit
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).