mysql-常用命令

1.修改密码:alter user 'user name'@'localhost' identified by 'new password';

2.授权远程登陆:grant all privileges on *.* to 'root'@'%' identified by 'demon123';

                            flush privileges;

3.给A表的a列作为外键,参考B表的b列:alter table A add constraint xxx foreign key(a) references B(b);

原文地址:https://www.cnblogs.com/xxxxxiaochuan/p/13576921.html