Sysop:MySQL

Aus immerda
Zur Navigation springen Zur Suche springen

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