第一招.mysql服务的启动和停止 net stop mysql net start mysql 第二招.登陆mysql 语法如下: mysql -u用户名-p用户密码 键入命令mysql -uroot -p,回车后提示你输入密码,输入12345,然后回车即可进入到mysql中了,mysql的提示符是: mysql> 注意,如果是连接到另外的机器上,则需要加入一个参数-h机器IP 第三招.增加新用户 格式:grant权限on数据库.* to用户名@登录主机identified by "密码
####监控脚本 [root@pdb~]# more /opt/VRTS/scripts/mysql_monitor.sh#!/bin/shn=`ps -ef |grep mysql|grep "port=3306"|wc -l`if test $n -eq 0 then exit 100 else exit 110fi[root@pdb~]# sh /opt/VRTS/scripts/mysql_monitor.sh ##############2 启动[root@pdb~]# cd