惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Hacker News
The Hacker News
S
Schneier on Security
P
Privacy & Cybersecurity Law Blog
Cisco Talos Blog
Cisco Talos Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Attack and Defense Labs
Attack and Defense Labs
NISL@THU
NISL@THU
L
LINUX DO - 最新话题
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
K
Kaspersky official blog
V
Vulnerabilities – Threatpost
G
GRAHAM CLULEY
Help Net Security
Help Net Security
Scott Helme
Scott Helme
V2EX - 技术
V2EX - 技术
Security Latest
Security Latest
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hacker News: Ask HN
Hacker News: Ask HN
C
Cybersecurity and Infrastructure Security Agency CISA
O
OpenAI News
L
LINUX DO - 热门话题
T
Tor Project blog
M
MIT News - Artificial intelligence
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Security Archives - TechRepublic
Security Archives - TechRepublic
量子位
I
InfoQ
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
SegmentFault 最新的问题
Google Online Security Blog
Google Online Security Blog
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Application and Cybersecurity Blog
Application and Cybersecurity Blog
雷峰网
雷峰网
Cloudbric
Cloudbric
Microsoft Azure Blog
Microsoft Azure Blog
D
Docker
T
Threat Research - Cisco Blogs
Blog — PlanetScale
Blog — PlanetScale
H
Heimdal Security Blog
T
Tenable Blog
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
美团技术团队
S
Secure Thoughts
Know Your Adversary
Know Your Adversary
H
Hackread – Cybersecurity News, Data Breaches, AI and More

博客园 - 柏放

检测移动设备横竖屏 [转]一句css代码让你的网站变灰,一起悼念地震中逝去的生命! MySQL数据库导入导出详解[转发] 国外达人收集的Cheet Sheet PHP学习:字符串操作和正则表达式 PHP学习:数组 PHP学习:文件操作 SQL Server:获得用户最新或前n条订单的几种SQL语句 SQL Server:APPLY表运算符 SQL Server:查询当前服务器有多少连接请求 SQL Server:关于Null的一些事 js倒计时 SQL Server:在Management Studio中使用Web浏览器 SQL Server:获得表的元数据 - SET FMTONLY ON 排序:插入排序及希尔排序 SQL Server:把CSV文件导入到SQL Server表中 SQL Server:使用一个语句块插入多条记录 SQL Server:在事务中回滚TRUNCATE操作 Google Map API学习记录
MYSQL命令行常用操作
柏放 · 2011-09-16 · via 博客园 - 柏放

显示数据库                                       mysql->show databases;
创建数据库                                       mysql->create database db;
删除数据库                                       mysql->drop database db;
选择数据库                                       mysql->use db
创建表                                              mysql->create table mytable(name varchar(20),sex(char(1),birth date);
删除表                                              mysql->drop table mytable;
显示表的内容                                   mysql->show tables;
显示表的结构                                   mysql->describe mytable;
在一个表中增加一条字段                mysql->alter table yourtable add id int not null auto_increment, add primary key (id);
删除一个字段                                   mysql->alter table yourtable drop name ;
创建mysql帐户                                mysql> grant all privileges on *.* to '123123'@'localhost'  -> identified by '123123';
                                                          mysql> GRANT SELECT,UPDATE ON *.* TO 'monty'@'%' (可以网络访问的账户) ->   IDENTIFIED BY '123123';
更改已有帐户的密码                        mysql> grant all privileges on *.* to '123123'@'localhost'  -> identified by '123123';  mysql> flush privileges;

posted on 2011-09-16 19:04  柏放  阅读(364)  评论()    收藏  举报