暂无图片
暂无图片
1
暂无图片
暂无图片
暂无图片

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

原创 库海无涯 2024-02-22
317

##

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 AUTHORITY\NetworkService' 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:\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="D:\MySQL\data\my.ini" --console --initialize-insecure=on --lower-case-table-names=1... D:\MySQL\MySQL Server 8.0\bin\mysqld.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:\MySQL\data\Data\ by --initialize is unusable. You can remove it. Aborting D:\MySQL\MySQL Server 8.0\bin\mysqld.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:\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="D:\MySQL\data\my.ini" --console --initialize-insecure=on --lower-case-table-names=1... D:\MySQL\MySQL Server 8.0\bin\mysqld.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:\MySQL\data\Data\ by --initialize is unusable. You can remove it. Aborting D:\MySQL\MySQL Server 8.0\bin\mysqld.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
微信截图_20240129150004.png

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论