使用实例管理器轻松管理多个MySQL实例
2009-04-10 11:17:47 来源:WEB开发网(3)、删除用户
[root@localhost ~]# /usr/local/mysql/bin/mysqlmanager --drop-user
WARNING: This program is deprecated and will be removed in 6.0.
[3338/3086501568] [08/04/24 14:36:42] [INFO] IM: started.
[3338/3086501568] [08/04/24 14:36:42] [INFO] Loading config file 'my.cnf'...
Enter user name: shit_all
[3338/3086501568] [08/04/24 14:36:45] [INFO] Loading the password database...
[3338/3086501568] [08/04/24 14:36:45] [INFO] Loaded user 'user_all'.
[3338/3086501568] [08/04/24 14:36:45] [INFO] Loaded user 'shit_all'.
[3338/3086501568] [08/04/24 14:36:45] [INFO] The password database loaded successfully.
[3338/3086501568] [08/04/24 14:36:45] [INFO] IM: finished.
(4)、列出当前管理用户
[root@localhost ~]# /usr/local/mysql/bin/mysqlmanager --list-user
WARNING: This program is deprecated and will be removed in 6.0.
[3366/3086087872] [08/04/24 14:37:07] [INFO] IM: started.
[3366/3086087872] [08/04/24 14:37:07] [INFO] Loading config file 'my.cnf'...
[3366/3086087872] [08/04/24 14:37:07] [INFO] Loading the password database...
[3366/3086087872] [08/04/24 14:37:07] [INFO] Loaded user 'user_all'.
[3366/3086087872] [08/04/24 14:37:07] [INFO] The password database loaded successfully.
user_all
[3366/3086087872] [08/04/24 14:37:07] [INFO] IM: finished.
[root@localhost ~]#
四、远程管理
C:Documents and SettingsAdministrator>mysql -uuser_all -p -P1999 -h192.168.0.2
31
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 3
Server version: 1.0-beta
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> show instances;
+---------------+--------+
| instance_name | state |
+---------------+--------+
| mysqld1 | online |
| mysqld2 | online |
+---------------+--------+
2 rows in set (0.00 sec)
mysql> quit
总结:
MySQL数据库的实例管理器对于多个MySQL实例的管理是很方便的,但它本身存在两个不足:
1、不能直接进行数据库的SQL管理命令。
2、一定要确保IM进程不会突然挂掉。
更多精彩
赞助商链接