使用实例管理器轻松管理多个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进程不会突然挂掉。
- ››实例详解Photoshop图层混合模式调色照片
- ››使用脚本恢复WinXP系统的用户登录密码
- ››使用phpMyadmin创建数据库及独立数据库帐号
- ››实例分享建站一年多的经验总结
- ››使用Zend Framework框架中的Zend_Mail模块发送邮件...
- ››使用cout标准输出如何控制小数点后位数
- ››使用nofollow标签做SEO的技巧
- ››实例分析企业网站宁做SEO也不做推广
- ››使用 WebSphere Message Broker 的 WebSphere Tra...
- ››使用SQL Server事件探查器做应用程序的性能分析
- ››使用SQL Server事件探查器分析死锁原因
- ››实例:Excel Vba程序中制作进度条,能显示实时进度...
更多精彩
赞助商链接