简体   繁体   English

Win 10 MySQL启动配置文件(my.ini)未加载数据目录

[英]Win 10 MySQL startup config file (my.ini) not loading the data directory

So I have been using wamp just for the MySQL side of things but I decided to upgrade since wamp was using MySQL v5. 因此,我一直仅将wamp用于MySQL方面,但由于wamp使用MySQL v5,所以我决定升级。 So I have installed MySQL version 8. 所以我已经安装了MySQL版本8。

I'm using a database about 60GB stored on my external SSD my problem is when I installed the new MySQL v8 I had to update the my.ini to state the external DB but for some reason, it just will not read from the my.ini file. 我正在使用大约60GB的数据库存储在我的外部SSD上,我的问题是,当我安装新的MySQL v8时,我必须更新my.ini来声明外部数据库,但是由于某种原因,它将无法从my中读取。 ini文件。

Below is an image with the my.ini, MySQL Workbench showing it is using that my.ini file for config and also showing that it not using the data path specified in my.ini. 下面是带有my.ini MySQL工作台的图像,该图像显示它正在使用my.ini文件进行配置,还显示了它未使用my.ini中指定的数据路径。

在此处输入图片说明

Even when I start both the daemon and the client with explicit arguments saying I was to use that config, it still ignores. 即使当我同时使用显式参数启动守护程序和客户端并说我要使用该配置时,它仍然会忽略。

One idea came to mind that since I have got a bunch of MYD/FRM/MYI files and this is a new DB would I have to import them somehow? 我想到一个主意,因为我有很多MYD / FRM / MYI文件,而这是一个新的数据库,我是否必须以某种方式导入它们?

在此处输入图片说明 Is that why it does not want to read the tables? 这就是为什么它不想读取表吗?

Thanks. 谢谢。

I see why you think you need to import the files in the data folder. 我明白了您为什么认为需要将文件导入data文件夹中的原因。 In fact all you need to do is to copay the old folder and past it inside the new mysql server folder. 实际上,您所需要做的就是共付旧文件夹并将其粘贴到新的mysql服务器文件夹中。

Inside the new mysql folder, open the prompt and execute the command: 在新的mysql文件夹中,打开提示并执行命令:

mysql_upgrade -u 'user_name' -p

Enter the password and it will take care of upgrading the old data. 输入密码,它将负责升级旧数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM