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);