MySql lower_case_table_names 导致 errno:150

本文详细介绍了在Windows平台下使用MySql5.5时,因my.ini配置文件中设置表名区分大小写导致创建约束错误的问题。主要探讨了当数据库引擎为InnoDb时,如何避免遇到“Can't create table '数据库名.#sql-编号'(errno:150)”的错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

windows 平台 MySql 5.5 中当my.ini 中设置了:

lower_case_table_names = 0  #表名大写

 数据库引擎为InnoDb , 此时创建约束就会导致:

Error Code: 1005. Can't create table '**.#sql-15f0_**' (errno: 150)

 

 

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/DanielChow/archive/2011/10/08/2202396.html

直播编号: 418878611905, 开播时间: Sat Jun 14 2025 10:12:37 GMT+0800 (中国标准时间) 20250614101237_follow 查询20250614101237_follow表失败: Error: Table 'mysql.20250614101237_follow' doesn't exist at Packet.asError (C:\公司小程序\公司小项目\公司的项目\live\小程序node接口\node_modules\mysql2\lib\packets\packet.js:728:17) at Query.execute (C:\公司小程序\公司小项目\公司的项目\live\小程序node接口\node_modules\mysql2\lib\commands\command.js:29:26) at PoolConnection.handlePacket (C:\公司小程序\公司小项目\公司的项目\live\小程序node接口\node_modules\mysql2\lib\connection.js:481:34) at PacketParser.onPacket (C:\公司小程序\公司小项目\公司的项目\live\小程序node接口\node_modules\mysql2\lib\connection.js:97:12) at PacketParser.executeStart (C:\公司小程序\公司小项目\公司的项目\live\小程序node接口\node_modules\mysql2\lib\packet_parser.js:75:16) at Socket.<anonymous> (C:\公司小程序\公司小项目\公司的项目\live\小程序node接口\node_modules\mysql2\lib\connection.js:104:25) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) { code: 'ER_NO_SUCH_TABLE', errno: 1146, sqlState: '42S02', sqlMessage: "Table 'mysql.20250614101237_follow' doesn't exist", sql: 'SELECT * FROM `20250614101237_follow`' }这个是什么报错
06-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值