码迷,mamicode.com
首页 > 数据库 > 详细

MySQL

时间:2017-07-22 21:05:51      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:lin   gre   数据库   ase   筛选   grant   ide   creat   esc   

登陆:mysql -u<user> -p<password>

显示所有的数据库: show databases;

使用某个数据库 use <db name>

显示所有的表  show tables;

显示某个表的结构  desc <table name>

显示表数据   select * from  <table name>\G   # \G  为了更好的显示

授权给某个账户  grant all on <db name>.* to ‘arnol‘@‘%‘ identified by ‘abc123‘;

         grant all on mypython.* to ‘arnol‘@‘%‘ identified by ‘abc123‘;

查看用户权限: show grants for <user name>;  

创建数据库   create database <db name>;

删除数据库 drop database <db name>;

show create database <db name>;  并不支持中文

 create database <db name> charset utf-8;

 

 

 

 

linux 命令 : 查看所有进程: ps -ef 

       筛选mysql相关  : ps -ef | grep mysql

 

MySQL

标签:lin   gre   数据库   ase   筛选   grant   ide   creat   esc   

原文地址:http://www.cnblogs.com/crazytao/p/7222451.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!