SHELL脚本操作mysql数据库
2016-09-14 15:46
417 查看
脚本如下:
#!/bin/bashUser="root"Passwd="password"$(which mysql) -u${User} -p${Passwd} -e "create database mytest;
use mytest;create table student (id int not null auto_increment,name varchar (50),primary key (id));insert into student
values(1,"xiaoming");"
#!/bin/bashUser="root"Passwd="password"$(which mysql) -u${User} -p${Passwd} -e "create database mytest;
use mytest;create table student (id int not null auto_increment,name varchar (50),primary key (id));insert into student
values(1,"xiaoming");"
相关文章推荐
- spark-shell学习笔记
- Shell基础
- 阻塞调用ShellExecute函数
- 爬虫:Scrapy7 - Scrapy终端(Scrapy shell)
- shell 后台执行以及隐藏脚本中调用其他脚本隐藏输出
- Centos 7 新用户登录出现-bash-4.2$ 解决
- centos7 中ifconfig提示-bash
- centos7 中ifconfig提示-bash
- Linux-Shell脚本编程-学习-2-Linux基本命令
- Win10 NotePad++ “ShellExecute failed (2): Is this command correct?”
- SHELL学习笔记
- Shell 命令的语法
- 循环打印字母数字不大于或不小于6的单词
- shell实现SSH自动登陆
- -bash-4.1问题
- 【shell脚本学习笔记】调用脚本将文件打包zip
- NPM, BOWER, GIT, AND BASH PROXY CONFIGURATIONS
- shell 获取cpu使用率
- 【Bash百宝箱】shell函数
- Xshell中用./startup.sh启动时候提示权限不够