mysql 启动脚本
来源:互联网 发布:怎么安装kali linux 编辑:程序博客网 时间:2024/05/29 19:42
[root@gby /usr/local/bin]# cat /usr/local/mysql/bin/mysqlctl
#!/bin/sh
#Mysql start|stop|restart
mysql_port=$2
mysql_username="用户名"
mysql_password="密码"
mysql_port="3306"
function_start_mysql()
{
printf "Starting MySQL....../n"
/usr/local/mysql/bin/mysqld_safe 2>&1 > /dev/null &
}
function_stop_mysql()
{
printf "Stoping MySQL....../n"
/usr/local/mysql/bin/mysqladmin -u${mysql_username} -p${mysql_password} -S /tmp/mysql.sock shutdown
#/usr/local/mysql/bin/mysqld_safe --user=mysql --basedir=/usr/local/mysql &
}
function_restart_mysql()
{
printf "Restarting MySQL....../n"
function_stop_mysql
function_start_mysql
}
function_open_mysql()
{
/usr/local/mysql/bin/mysql -u${mysql_username} -p${mysql_password}
}
if [ "$1" = "start" ]; then
function_start_mysql
elif [ "$1" = "stop" ]; then
function_stop_mysql
elif [ "$1" = "restart" ]; then
function_restart_mysql
elif [ "$1" = "open" ]; then
function_open_mysql
else
printf "Usage: mysql.sh {start|stop|restart}/n"
fi
############################################################
#Usage:chmod +x mysq.sh
#mysql.sh start 3306 mysql.sh stop 3306 mysql.sh restart mysql.sh open
- MySQL启动脚本
- mysql 启动脚本
- mysql启动脚本
- mysql启动脚本详解
- mac mysql 启动脚本
- MySql批处理启动、停止脚本
- mysql启动时执行脚本
- Mysql mysql.server启动脚本详解
- MySQL启动脚本 mysql.server 详解
- MySQL服务启动脚本完全解析
- mysql 多实例启动和停止脚本
- MySQL启动脚本改装,支持多配置文件
- shell 脚本监控MySQL数据库启动状态
- Mysql服务启动脚本制作(win)
- Mysql启动与关闭的脚本
- 实战:自定义脚本启动mysql-mysql 5.6.19
- 启动脚本
- 启动脚本
- 21个新鲜的CSS 3教程与技巧
- Android 环境 搭建
- Objective-C语法快速参考
- 钢管裂痕检测技术
- MVC3 Razor语法速查
- mysql 启动脚本
- spam启动脚本
- Css Spirit学习
- bootanimation
- 嵌入式Linux中ARM gcc嵌套汇编学习-ARM GCC Inside Assembler
- 多尺度图像边缘提取技术
- [转]svn利用TortoiseSVN忽略文件或文件夹(目录)
- 金额大小写转换
- rs232.exe 串口控制台命令源代码