MySQL Basic Operations Command

Source: Internet
Author: User

MySQL Permissions:


#查看mysql中用户权限

Show GRANTS;


#查看mysql中指定用户权限

Show GRANTS for ' root ' @ '% ';


#mysql授权:

GRANT all privileges on * * to ' Zabbix ' @ ' percent ' identified by ' Zabbix ';

FLUSH privileges;


#创建数据库:

CREATE database dba_hr;

CREATE schema Dba_ops;


#查询数据库:

show databases;


#进入某个数据库:

Use DBA_HR;


#查看当前在哪个库, the state of the library:

Status

#见表:

CREATE TABLE Test (id int (), col1 VARCHAR (5), col2 TIMESTAMP);



#查看表结构

DESCRIBE test;



#显示表列, describe functions Similarly, describe can be understood as a shortcut to show columns.

Show COLUMNS from host;


#显出错误信息

Show ERRORS;



#显示告警信息:

SHOW WARNINGS


This article is from the "LINUX Super Dream" blog, make sure to keep this source http://215687833.blog.51cto.com/6724358/1893046

MySQL Basic Operations Command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.