Sysop:MySQL: Unterschied zwischen den Versionen

Aus immerda
Zur Navigation springen Zur Suche springen
Zeile 33: Zeile 33:


[[Category:ImmerdaDocumentationProject]]
[[Category:ImmerdaDocumentationProject]]
[[Category:DB]]
[[Category:MySQL]]
[[Category:MySQL]]

Version vom 25. Juli 2007, 01:08 Uhr

cluster

dump

structure:

 mysqldump --opt --no-data -u user --password="pwd" database | bzip2 -c > database_db_dump_structure.sql.bz2

data:

 mysqldump --opt --no-create-info -u user --password="pwd" database | bzip2 -c > database_db_dump_data.sql.bz2

adding new user accounts

mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
    ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
    ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT RELOAD,PROCESS ON *.* TO 'admin'@'localhost';
mysql> GRANT USAGE ON *.* TO 'dummy'@'localhost';

fixing tables

myisamchk --silent --fast datenbank/*.MYI
  • and if very critical
myisamchk --force --update-state --key_buffer_size=64M --sort_buffer_size=64M --read_buffer_size=1M --write_buffer_size=1M datenbank/*.MYI