You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MySQL无法运行脚本求助:两类报错及编码异常问题

MySQL脚本执行失败及编码兼容问题求助

问题现象

脚本执行报错

  • 未选择默认schema时,报错:Preparing... [WinError 32] The process cannot access the file because it is being used by another process:
  • 选择默认schema时,报错:sequence item 6: expected str instance, bytes found

脚本编码异常

打开脚本时会弹出编码选择窗口。其他机器可通过utf8编码正常打开,但本机仅能以latin1编码打开,导致数据库数据损坏;若选择utf8或其他编码,会提示:The file contents could not be converted from 'utf8' to UTF-8: Invalid byte sequence in conversion input

该问题出现在所有SQL脚本上,示例脚本如下:

SET @organizationId = 34299;

SET @userId = (SELECT max(user.id) FROM user);

INSERT IGNORE INTO user (id, uuid, username, password, first_name, last_name, email, owner_organization_id, sign_app_port) VALUES (@userId + 1, uuid(),'test@gmail.rs','$2a$10$Gt/hIHyrP2NNzDoC5bbu5K9CKlyZJXEy', 'Test', 'Test','test@gmail.rs', @organizationId, 8086);
INSERT IGNORE INTO user (id, uuid, username, password, first_name, last_name, email, owner_organization_id, sign_app_port) VALUES (@userId + 2, uuid(),'test2@gmail.rs','$2a$10$dva/lg08AtbWfDoC5bbuzmhfB0F.9hMi', 'Test', 'Test','test2@gmail.rs', @organizationId, 8086);

已尝试的无效方案

  • 重装MySQL
  • 更换旧版本MySQL

操作系统为Windows 10专业版,目前未找到有效解决方案,恳请帮助。

内容的提问来源于stack exchange,提问作者u-stankovic

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.07 05:30:45