607的彩的正确网址

现在的位置: 607的彩的正确网址 > 数据库 > 正文

MySQL如何用SHOW DATABASES语句查看或显示数据库

2020年02月13日 数据库 ⁄ 共 2376字 ⁄ 字号 评论关闭

  shujukukeyikanzuoshiyigezhuanmencunchushujuduixiangderongqi,meiyigeshujukudouyouweiyidemingcheng,bingqieshujukudemingchengdoushiyoushijiyiyide,zheiyangjiukeyiqingxidekanchumeigeshujukuyonglaicunfangshenmeshuju。zai mysql shujukuzhongcunzaixitongshujukuhezidingyishujuku,xitongshujukushizaianzhuang mysql houxitongzidaideshujuku,zidingyishujukushiyouyonghudingyichuangjiandeshujuku。

  zai mysql zhong,keshiyong show databases yujulaichakanhuoxianshidangqianyonghuquanxianfanweiyineideshujuku。chakanshujukudeyufageshiwei:

  show databases [like 'shujukuming'];

  yufashuomingruxia:

607的彩的正确网址  like congjushikexuanxiang,yongyupipeizhidingdeshujukumingcheng。like congjukeyibufenpipei,yekeyiwanquanpipei。

  shujukumingyoudanyinhao' 'baowei。

  实例1:查看所有数据库

607的彩的正确网址  liechudangqianyonghukechakandesuoyoushujuku:

607的彩的正确网址  mysql> show databases;

  +--------------------+

  | database |

  +--------------------+

607的彩的正确网址  | information_schema |

  | mysql |

607的彩的正确网址  | performance_schema |

  | sakila |

  | sys |

  | world |

  +--------------------+

  6 row in set (0.22 sec)

607的彩的正确网址  keyifaxian,zaishangmiandeliebiaozhongyou 6 geshujuku,tamendoushianzhuang mysql shixitongzidongchuangjiande,qigezigongnengruxia:

  information_schema:zhuyaocunchulexitongzhongdeyixieshujukuduixiangxinxi,biruyonghubiaoxinxi、liexinxi、quanxianxinxi、zifujixinxihefenquxinxideng。

607的彩的正确网址  mysql:mysql dehexinshujuku,leisiyu sql server zhongde master biao,zhuyaofuzecunchushujukuyonghu、yonghufangwenquanxiandeng mysql zijixuyaoshiyongdekongzhiheguanlixinxi。changyongdebiruzai mysql shujukude user biaozhongxiugai root yonghumima。

607的彩的正确网址  performance_schema:zhuyaoyongyushoujishujukufuwuqixingnengcanshu。

  sakila:mysql tigongdeyanglishujuku,gaishujukugongyou 16 zhangbiao,zheixieshujubiaodoushibijiaochangjiande,zaishejishujukushi,keyicanzhaozheixieyanglishujubiaolaikuaisuwanchengsuoxudeshujubiao。

607的彩的正确网址  sys:mysql 5.7 anzhuangwanchenghouhuiduoyige sys shujuku。sys shujukuzhuyaotigongleyixieshitu,shujudoulaiziyu performation_schema,zhuyaoshirangkaifazheheshiyongzhegengfangbiandichakanxingnengwenti。

607的彩的正确网址  world:world shujukushi mysql zidongchuangjiandeshujuku,gaishujukuzhongzhibaokuo 3 zhangshujubiao,fenbiebaocunchengshi,guojiaheguojiashiyongdeyuyandengneirong。

  实例2:创建并查看数据库

  xianchuangjianyigemingwei test_db deshujuku:

607的彩的正确网址  mysql> create database test_db;

  query ok, 1 row affected (0.12 sec)

  zaishiyong show databases yujuxianshiquanxianfanweineidesuoyoushujukuming,ruxiasuoshi:

607的彩的正确网址  mysql> show databases;

607的彩的正确网址  +--------------------+

  | database |

  +--------------------+

607的彩的正确网址  | information_schema |

607的彩的正确网址  | mysql |

  | performance_schema |

607的彩的正确网址  | sakila |

  | sys |

607的彩的正确网址  | test_db |

  | world |

  +--------------------+

607的彩的正确网址  7 row in set (0.22 sec)

607的彩的正确网址  nikan,gangcaichuangjiandeshujukuyijingbeixianshichulaile。

607的彩的正确网址  shili3:shiyong like congju

607的彩的正确网址  xianchuangjiansangeshujuku,mingzifenbiewei test_db、db_test、db_test_db。

607的彩的正确网址  1) shiyong like congju,chakanyu test_db wanquanpipeideshujuku:

  mysql> show databases like 'test_db';

607的彩的正确网址  +--------------------+

  | database (test_db) |

607的彩的正确网址  +--------------------+

607的彩的正确网址  | test_db |

607的彩的正确网址  +--------------------+

607的彩的正确网址  1 row in set (0.03 sec)

  2) shiyong like congju,chakanmingzizhongbaohan test deshujuku:

  mysql> show databases like '%test%';

  +--------------------+

607的彩的正确网址  | database (%test%) |

607的彩的正确网址  +--------------------+

  | db_test |

  +--------------------+

  | db_test_db |

607的彩的正确网址  +--------------------+

607的彩的正确网址  | test_db |

607的彩的正确网址  +--------------------+

607的彩的正确网址  3 row in set (0.03 sec)

  3) shiyong like congju,chakanmingziyi db kaitoudeshujuku:

  mysql> show databases like 'db%';

  +----------------+

607的彩的正确网址  | database (db%) |

607的彩的正确网址  +----------------+

  | db_test |

607的彩的正确网址  +----------------+

  | db_test_db |

607的彩的正确网址  +----------------+

  2 row in set (0.03 sec)

607的彩的正确网址  4) shiyong like congju,chakanmingziyi db jieweideshujuku:

  mysql> show databases like '%db';

  +----------------+

607的彩的正确网址  | database (%db) |

  +----------------+

  | db_test_db |

  +----------------+

  | test_db |

  +----------------+

  2 row in set (0.03 sec)

607的彩的正确网址  yishangjiushiyouguanmysqlchakanhuoxianshishujukudexiangguanjieshao,ruyaolejiegengduoshujukuzhishi,qingshangxuebuyuan。

baoqian!pinglunyiguanbi.

2元中国福利彩票怎么看 2元买彩票选几个数字 2元中国福利彩票的买法 2元就可以打1毛的斗地主棋牌 2元彩是值得您信赖的 2元斗地主群 2元的彩的网 2元彩票双色球走势图双色球 2元彩票网全国走势图 2元就可以打1毛的炸金花棋牌