#/www/mysql/bin/mysqladmin shutdown |
#cp –R /www/mysql/ /www/backup/ |
#mysqldump mvnforum > /www /backup/mvnforum.sql #mysqldump demo > /www/backup/demo.sql |
#rm –R /www/mysql |
#/usr/sbin/groupadd –g 201 mysql |
#/usr/sbin/useradd -u 1001 -g mysql -d /www/mysql -m -s /bin/ tcsh -c "MySQL Administrator" mysql |
#passwd mysql #设置为mysql |
#tar –zxvf mysql-standard -4.1.4-gamma-pc-linux-i686.tar.gz |
#cp mysql-standard-4.1.4-gamma-pc-linux-i686 /usr/local/mysql |
#chown mysql.mysql /usr/local/mysql –R |
#/usr/local/mysql/bin/mysqld_safe & |
/usr/local/mysql/bin/mysqld_safe & |
PATH=$PATH: /usr/local/mysql/bin |
#mysqladmin –u root password |
#mysql –u root –p |
#> GRANT USAGE ON *.* TO root@172.16.98.2 IDENTIFIED BY ''; #>update user set Select_priv='Y', Insert_priv='Y',Update_priv='Y', Delete_priv='Y',Create_priv='Y', Drop_priv='Y',Reload_priv='Y', _priv='Y',Process_priv='Y', File_priv='Y',Grant_priv ='Y', References_priv='Y',Index_priv='Y', Alter_priv='Y',Show_db_priv='Y', Super_priv='Y',Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y',Repl_slave_priv='Y', Repl_client_priv='Y' where Host='172.16.98.2' and User='root'; #>update user set max_questions=30000, max_updates=30000 where User=”root”; |
#> GRANT USAGE ON *.* TO mysql@localhost IDENTIFIED BY ''; #>update user set Select_priv='Y', Insert_priv='Y', Update_priv='Y',Delete_priv='Y', Create_priv='Y',Drop_priv='Y',Reload_priv='Y', Shutdown_priv='Y',Process_priv='Y',File_priv='Y', Grant_priv ='Y', References_priv='Y',Index_priv='Y', Alter_priv='Y', Show_db_priv='Y',Super_priv='Y',Create_tmp_table_priv='Y', Lock_tables_priv='Y',Execute_priv='Y',Repl_slave_priv='Y', Repl_client_priv='Y' where Host='localhost' and User='mysql'; #>update user set max_questions=3000000, max_updates=3000000 where user=”mysql”; //mysql作为备份/恢复用户 |
#mysqladmin -u root -p reload #mysqladmin -u root -p flush-privileges |
#./mysql -u mysql -p mvnforum < /www/backup/mvnforum.sql #./mysql -u mysql -p demo < /www/backup/demo.sql |
新闻热点
疑难解答