Mysql 错误问题汇总(不断更新中)

时间:2024-01-18 23:51:22 

1、Mysql errono 1005 : 主外键不是完全一致 , 请检查如下几点:

a、字段是否存在
b、类型是否一致(注意unsigned , powerdesign 生成问题)
c、数据库引擎是否一致
d、字符编码是否一致
e、windows平台 * 意修改lower_case_table_names = 0, windows本身不区分文件大小写,改为0之后就区分了可能造成找不到引用的表

2、Mysql errono 121: 外键约束名称重复

3、记录 Mysql WorkBench 中单词缩写意义:

PK: primary key (column is part of a pk)
NN: not null (column is nullable)
UQ: unique (column is part of a unique key)
AI: auto increment (the column is auto incremented when rows are inserted)
BIN: binary (if dt is a blob or similar, this indicates that is binary data, rather than text)
UN: unsigned (for integer types, see docs: “10.2. Numeric Types”)
ZF: zero fill (rather a display related flag, see docs: “10.2. Numeric Types”)

4、mysql 权限设置
//添加远程主机访问MYSQL root权限
insert into user(host,user,password) values('%','root',PASSWORD('root'));
//root 权限授权
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
//更新权限设置
flush privileges;

5、防火墙设置
//打开端口
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
//保存
/etc/rc.d/init.d/iptables save
//查看状态
/etc/init.d/iptables status

6、开机自动运行(实现类似Windows服务)
/sbin/chkconfig --level 2345 mysqld on
/sbin/chkconfig --list
结果如下:
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off

标签:Mysql,问题汇总
0
投稿

猜你喜欢

  • 如何用C代码给Python写扩展库(Cython)

    2023-06-08 17:06:32
  • python-json校验-jsonpath解析

    2023-11-20 11:40:01
  • python中matplotlib的颜色及线条控制的示例

    2023-11-04 08:11:50
  • Microsoft Sql server2005的安装步骤图文详解及常见问题解决方案

    2024-01-22 07:23:00
  • 利用Python+eval函数构建数学表达式计算器

    2021-01-28 14:38:44
  • pytorch中关于distributedsampler函数的使用

    2023-01-18 01:10:01
  • Oracle、MySQL和SqlServe三种数据库分页查询语句的区别介绍

    2024-01-15 08:48:41
  • 如何将HTML字符转换为DOM节点并动态添加到文档中详解

    2023-08-23 12:26:39
  • 基于Python实现千图成像工具的示例代码

    2022-03-14 12:19:21
  • python常用模块详解

    2021-05-24 05:16:55
  • 基于Python制作一键桌面整理工具

    2022-08-22 11:45:52
  • 通过sql语句将blob里的char取出来转成数字保存在其它字段

    2024-01-20 10:49:05
  • 深入浅析Vue中mixin和extend的区别和使用场景

    2024-05-29 22:42:43
  • python异步任务队列示例

    2021-05-04 03:09:07
  • mysql3升级到mysql5解决乱码心得

    2009-04-20 14:41:00
  • js解析xml字符串和xml文档实现原理及代码(针对ie与火狐)

    2024-04-18 09:51:29
  • 基于python的itchat库实现微信聊天机器人(推荐)

    2021-11-30 13:54:21
  • Python如何使用type()函数查看数据的类型

    2022-05-30 17:49:31
  • 解决idea打开窗口/tab过多导致隐藏的问题

    2022-12-29 10:45:42
  • Python编程语言的35个与众不同之处(语言特征和使用技巧)

    2023-11-21 23:09:25
  • asp之家 网络编程 m.aspxhome.com