Home > Database > Mysql Tutorial > body text

Linux平台下MySQL命令操作

WBOY
Release: 2016-06-07 17:05:49
Original
1177 people have browsed it

Linux shell 批量创建数据库/表 Shell 脚本如下: # create database and table HOST=

Linux shell 批量创建数据库/表

Shell 脚本如下:

执行脚本后,结果如下:



MySQL 从常用操作命令:

显示数据库

show databases;

切换数据库
use top123;

显示数据库表

show tables;

修改主键

alter table gametop800 add primary key(id);

删除主键

alter table gametop800 drop primary key;

添加组合主键

alter table gametop800 add primary key(id, dtime);


如果感兴趣的话,可以深入综合运用awk,cut,paste,正则表达式,数据库操作等较为复杂的语法,完成MySQL数据库操作

下面是实现了一个抓取网页,,提取特征,抽取信息,结果汇总,批量插入数据库永久保存

示例:

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!