Bug #114428 windwos服务不支持中文路径 Windwos service does not support Chinese paths
Submitted: 20 Mar 11:48 Modified: 20 Mar 11:58
Reporter: 张诚可 张 Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.3.0 OS:Windows (Windows 11)
Assigned to: CPU Architecture:x86
Tags: Chinese paths, mysqld.exe, windwos

[20 Mar 11:48] 张诚可 张
Description:
Registering as a Windows service using mysqld.exe, the service cannot start when there is a Chinese path.

How to repeat:
Run in cmd window:

Microsoft Windows [版本 10.0.22631.3296]
(c) Microsoft Corporation。保留所有权利。

C:\Windows\System32>H:\代码\源码\弓网在线监测装置\综合定位\PositionSever\mysql-8.3.0-winx64\bin\mysqld.exe --install Test_Mysql
Service successfully installed.

C:\Windows\System32>net start Test_Mysql
Test_Mysql 服务正在启动 .
Test_Mysql 服务无法启动。

服务没有报告任何错误。

请键入 NET HELPMSG 3534 以获得更多的帮助。

C:\Windows\System32>sc delete Test_Mysql
[SC] DeleteService 成功
[20 Mar 11:58] MySQL Verification Team
Hi Mr. 张诚可 张,

Thank you for your bug report.

You are quite right. MySQL is designed so that it can use only a limited number of characters in the path.

Chinese ideograms can not be included in the paths for MySQL.

Not a bug.
[20 Mar 12:19] MySQL Verification Team
Hi Mr. 张诚可 张,

Actually , we checked ...... 

Chinese ideograms work find in the all paths, providing all your character set settings are in UTF8MB4.

Our Reference Manual contains a list for all the character set and collation settings ......

Hence, please try that .....
[20 Mar 12:30] MySQL Verification Team
Hi,

Here it is .....

It worked for us .......

mysql -uUSER -pPASSWORD  test < tmp/我的目錄/event_bug.sql
*************************** 1. row ***************************
       EVENT_CATALOG: def
        EVENT_SCHEMA: test
          EVENT_NAME: test
             DEFINER: USER@LOCALHOST
           TIME_ZONE: SYSTEM
          EVENT_BODY: SQL
    EVENT_DEFINITION: insert into test.t1 values (1,'Tom')
          EVENT_TYPE: RECURRING
          EXECUTE_AT: NULL
      INTERVAL_VALUE: 2
      INTERVAL_FIELD: MINUTE
                STARTS: 2024-03-20 14:25:34
                ENDS: NULL
              STATUS: ENABLED
       ON_COMPLETION: PRESERVE
             CREATED: 2024-03-20 14:25:34
        LAST_ALTERED: 2024-03-20 14:25:34
       LAST_EXECUTED: 2024-03-20 14:25:34
       EVENT_COMMENT:
          ORIGINATOR: 82721
CHARACTER_SET_CLIENT: utf8mb4
COLLATION_CONNECTION: utf8mb4_0900_ai_ci
  DATABASE_COLLATION: utf8mb4_0900_ai_ci

and this was a test case:

cat tmp/我的目錄/event_bug.sql
DROP EVENT IF EXISTS `test`.`test`;
CREATE EVENT `test`.`test`  ON SCHEDULE EVERY 2 MINUTE  ON COMPLETION NOT PRESERVE  ENABLE   DO insert into test.t1 values (1,'Tom');
CREATE EVENT `test`.`test`  ON SCHEDULE EVERY 2 MINUTE  ON COMPLETION PRESERVE  ENABLE   DO insert into test.t1 values (1,'Tom');
select * from information_schema.events\G
DROP EVENT IF EXISTS `test`.`test`;

Hence, this is not a bug.

It just works !!!!