1,查看SP的内容:
use sys;
SHOW CREATE PROCEDURE ps_setup_enable_consumer;
SELECT body FROM mysql.proc WHERE db = 'sys' AND name = 'ps_setup_enable_consumer' ;
SELECT CAST(body AS CHAR(10000) CHARACTER SET utf8) FROM mysql.proc WHERE db = 'sys' AND name = 'ps_setup_enable_consumer' ;
2,显示表的Schema
desc tablename;
3,创建用户
CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'password
';
file:///C:/Users/shenyufeng557/Downloads/refman-5.7-en.html-chapter/refman-5.7-en.html-chapter/sql-syntax.html#create-user
查看权限:
SHOW GRANTS FOR 'joe'@'home.example.com';
4,显示 表的状态
SHOW TABLE STATUS FROM menagerie LIKE 'p%' ;