Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mysql [2008/09/26 19:15]
a
mysql [2012/10/15 11:58] (current)
zagi old revision restored
Line 40: Line 40:
    mysql --user=username --password=password --execute="DROP DATABASE dbname; CREATE DATABASE dbname; CHARACTER SET utf8 COLLATE utf8_general_ci;"    mysql --user=username --password=password --execute="DROP DATABASE dbname; CREATE DATABASE dbname; CHARACTER SET utf8 COLLATE utf8_general_ci;"
    mysql --user=username --password=password --default-character-set=utf8 dbname < dump.sql    mysql --user=username --password=password --default-character-set=utf8 dbname < dump.sql
 +
  
  
Line 64: Line 65:
    # cat shema| mysql --default-character-set=utf8    # cat shema| mysql --default-character-set=utf8
    # cat data| mysql --default-character-set=latin2    # cat data| mysql --default-character-set=latin2
 +
 +===== Aternative (new) way Converting Character Sets  =====
 +
 +   wget http://www.pablowe.net/convert_charset
 +
 +It will be added to [[https://code.launchpad.net/perconatools|Percona Tools]] on Launchpad (or perhaps [[http://www.maatkit.org/|maatkit]], if it proves useful enough) once it is feature complete. Outstanding issues include:
  
 ===== InnoDB ===== ===== InnoDB =====
Line 86: Line 93:
 If your table is large, then it may take a while to convert it over. There will probably be a fair amount of CPU usage and disk I/O in the process. If your table is large, then it may take a while to convert it over. There will probably be a fair amount of CPU usage and disk I/O in the process.
  
-These statements are also safe in replicated environments. When you issue this statement to the master, it will begin the conversion process. Once it is complete on the master, the statement will roll down to the slaves, and they will begin the conversion as well. Keep in mind, however, that this can greatly reduce the performance of your configuration in the process.+These statements are also safe in replicated environments. When you issue this statement to the master, it will begin the conversion process. Once it is complete on the master, the statement will roll down to the slaves, and they will begin the conversion as well. Keep in mind, however, that this can greatly reduce the performance of your configuration in the process.\\ 
 + 
 +\\ 
 +<code bash> 
 +$ rm $HOME/.mysql_history\\ 
 +$ ln -s /dev/null $HOME/.mysql_history\\ 
 +\\ 
 +</code> 
 + 
 +=== Reducing ibdata mysql file === 
 +http://vdachev.net/blog/2007/02/22/mysql-reducing-ibdata1/ 
mysql.1222449310.txt.gz · Last modified: 2009/05/25 00:34 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready