mysql常见命令

 mysql>show variables like 'character_set_%';//查看变量
 mysql>source d:/mysql.sql;//引人外部sql
mysql>flush privileges
mysql>update user set password=password('123456') where user='root'; //修改密码

mysql> show index from lottery_order_notice; 查看索引
mysql> show status like '%thread%'; 查看线程

建库,授权
CREATE DATABASE jiradb CHARACTER SET utf8 COLLATE utf8_bin;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on <JIRADB>.* TO '<USERNAME>'@'<JIRA_SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>';
#grant all privileges on jiradb.* to jira@localhost identified by 'jira'
flush privileges;

猜你喜欢

转载自stevenfeng.iteye.com/blog/1729460