分类: LINUX
2008-11-23 16:45:01
1.添加管理员:
grant all privileges on *.* to root@IP identified by ‘密码’;
flush privileges; ///刷新数据库
2.查看环境变量
show variables
3.显示所有数据库和库里的所有表
show databases
show tables
4.数据库复制相关master/slave
show master status
show slave status
load data from master (从master同步数据,慎用,执行时master数据库会被锁住)
slave start
slave stop
flash logs(截断日志)
PURGE MASTER LOGS TO ‘mysql-bin.010′;
PURGE MASTER LOGS BEFORE ‘2003-04-02 22:46:26′; (删除日志)
5.显示当前操作
show processlist