数据库SQL
Alan • Lee
写代码就要像写诗一样
博客:blog.alanlee.top
展开
-
使用Navicat连接远程服务器的mysql
使用Navicat连接远程服务器的mysql在服务器中的mysql中授权grant all privileges on *.* to 'root'@'%' identified by '服务器mysql密码.' with grant option;刷新权限flush privileges;使用本地navicat连接服务器的mysql,需要在常规设置和SSH中这两个地...原创 2019-11-24 14:54:04 · 259 阅读 · 0 评论 -
mysql中添加外键约束,遇到cannot add foreign key constraint错误
mysql中添加外键约束错误:cannot add foreign key constraint我总结为以下几点:外键字段不能为该表的主键;外键字段参考字段必须为参考表的主键。外键和主键的类型应一致。如果出现这个错误,请检查以上三点。...原创 2018-12-28 11:01:39 · 1320 阅读 · 0 评论