Windows Server的主机名设置为中文真的好吗?

2024年 2月 22日 71.1k 0

##

Windows Server的主机名设置为中文真的好吗?

1、简单的问题

在使用MySQL Installer - Community并且默认参数安装MySQL时,遇到了问题

Beginning configuration step: Writing configuration file

Saving my.ini configuration file...
Saved my.ini configuration file.
Ended configuration step: Writing configuration file

Beginning configuration step: Updating Windows Firewall rules

Adding a Windows Firewall rule for MySQL80 on port 3306.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 3306" protocol=TCP localport=3306 dir=in action=allow
确定。

Successfully added the Windows Firewall rule.
Adding a Windows Firewall rule for MySQL80 on port 33060.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 33060" protocol=TCP localport=33060 dir=in action=allow
确定。

Successfully added the Windows Firewall rule.
Ended configuration step: Updating Windows Firewall rules

Beginning configuration step: Adjusting Windows service

Attempting to grant the required filesystem permissions to the 'NT AUTHORITYNetworkService' account.
Granted permissions to the data directory.
Adding new service
New service added
Ended configuration step: Adjusting Windows service

Beginning configuration step: Initializing database (may take a long time)

Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.36...
Starting process with command: D:MySQLMySQL Server 8.0binmysqld.exe --defaults-file="D:MySQLdatamy.ini" --console --initialize-insecure=on --lower-case-table-names=1...
D:MySQLMySQL Server 8.0binmysqld.exe (mysqld 8.0.36) initializing of server in progress as process 4060
mysqld: File '.鎴戜笉淇?bin.index' not found (OS errno 2 - No such file or directory)
The newly created data directory D:MySQLdataData by --initialize is unusable. You can remove it.
Aborting
D:MySQLMySQL Server 8.0binmysqld.exe: Shutdown complete (mysqld 8.0.36) MySQL Community Server - GPL.
Process for mysqld, with ID 4060, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.36.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)

Beginning configuration step: Initializing database (may take a long time)

从日志分析是在初始化的时候出现了错误,然后还有一些乱码无法处理。随后检查了参数文件,发现是参数文件读了系统主机名(中文)导致了错误。

2、处理过程

2.1、修改主机名

修改主机名之后,重启主机,然后再次安装。再次出现错误

Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.36...
Starting process with command: D:MySQLMySQL Server 8.0binmysqld.exe --defaults-file="D:MySQLdatamy.ini" --console --initialize-insecure=on --lower-case-table-names=1...
D:MySQLMySQL Server 8.0binmysqld.exe (mysqld 8.0.36) initializing of server in progress as process 4008
mysqld: File '.閹存垳绗夋穱?bin.index' not found (OS errno 2 - No such file or directory)
The newly created data directory D:MySQLdataData by --initialize is unusable. You can remove it.
Aborting
D:MySQLMySQL Server 8.0binmysqld.exe: Shutdown complete (mysqld 8.0.36) MySQL Community Server - GPL.
Process for mysqld, with ID 4008, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.36.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)

分析日志,还是在相同的地方遇到了相同的问题。除自定义参数初始化外,暂时没有其他方法。

2.2、成功的方法

尝试卸载MySQL Installer - Community之后再安装。安装成功。

2.3、另一种方法

自定义参数文件初始化。

2.4、MySQL Installer - Community分析

这个程序安装完成之后会在C盘的目录留下一些信息,这是导致读取主机名出现错误的重要原因,

3、吐槽一些乱象

某些平台和群就是一言堂,Bye

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论