mysql小结

1. mysql中delete操作不能使用别名;

例子:delete from tablezeng as zeng where zeng.id=19;    X错误

  此句中不能使用zeng别名代替tablezeng;

 关联查询:左外连接是以左为标准,不论右是否为空;

2. Mysql权限开启命令:

语法:

mysql8.0以下:
grant [权限] on [数据库名].[表名] to ['用户名']@['web服务器的ip地址'] identified by ['密码'];

具体实现:
grant all on *.* to 'root'@'%' identified by 'root';
或者指定IP地址
grant all on *.* to 'root'@'192.168.1.103' identified by 'root';

mysql8.0+启动方式:

GRANT ALL ON *.* TO 'root'@'%';

FLUSH PRIVILEGES;

posted @ 2019-11-07 18:45  ZJfor  阅读(85)  评论(0编辑  收藏  举报