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

推荐订阅源

AI
AI
WordPress大学
WordPress大学
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
V
V2EX
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
IT之家
IT之家
D
Docker
M
MIT News - Artificial intelligence
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
博客园_首页
Y
Y Combinator Blog
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
月光博客
月光博客
C
CXSECURITY Database RSS Feed - CXSecurity.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
Know Your Adversary
Know Your Adversary
A
Arctic Wolf
Vercel News
Vercel News
T
Threat Research - Cisco Blogs
T
Threatpost
Apple Machine Learning Research
Apple Machine Learning Research
L
LINUX DO - 热门话题
T
The Exploit Database - CXSecurity.com
N
Netflix TechBlog - Medium
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
J
Java Code Geeks
爱范儿
爱范儿
Cisco Talos Blog
Cisco Talos Blog
博客园 - 叶小钗
Latest news
Latest news
C
Check Point Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - Franky
P
Privacy International News Feed
MyScale Blog
MyScale Blog
Project Zero
Project Zero
Simon Willison's Weblog
Simon Willison's Weblog

博客园 - 柏放

检测移动设备横竖屏 [转]一句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)  评论()    收藏  举报