1 使用MySQL

1.1 连接

  • 主机名(localhost)
  • 端口(3306)
  • 一个合法的用户名
  • 用户口令

1.2 选择数据库

  • USE crashcourse

1.3 了解数据库和表

  • SHOW databases;
  • show tables;
  • show也可以用来显示表列
    • show columns from customers;
    • describe customers;
  • 用于显示广泛的服务器状态信息
    • show status;
  • 分别用来显示创建特定数据库或表的MySQL语句
    • show create database
    • show create table
  • 用来显示授予用户的安全权限
    • show grants
  • 用来显示服务器错误或警告消息
    • show errors
    • show warnings
原文地址:https://www.cnblogs.com/sanjun/p/8274183.html