[MySQL] Failed to set datadir
-
i wanna ask. i forgot my MySQL root password, so i tried to fix it based from this link: MySQL :: MySQL and Windows :: 4 Resetting the Root Password: Windows Systems[^] but it still doesn't work and there's few messages, but there's 1 error msg, i.e.:
Failed to set datadir to 'C:\Program Files\MySQL\MySQL Server 8.0\data\' (OS errno: 2 - No such file or directory)
in addition, there's also a warning i.e.:Can't create test file C:\Program Files\MySQL\MySQL Server 8.0\data\mysqld_tmp_file_case_insensitive_test.lower-test
any1 know how to fix this issue..?And does the directory 'C:\Program Files\MySQL\MySQL Server 8.0\data\' actually exist?
-
And does the directory 'C:\Program Files\MySQL\MySQL Server 8.0\data\' actually exist?
no. but the questions is: 1. why it make such error..? (e.g. tries to access non-exist folder) 2. why it doesn't create the folder by itself..? 3. should the folder created manually..? since it didn't mentioned anything in the article about that folder or even error-handling if it occurred
-
no. but the questions is: 1. why it make such error..? (e.g. tries to access non-exist folder) 2. why it doesn't create the folder by itself..? 3. should the folder created manually..? since it didn't mentioned anything in the article about that folder or even error-handling if it occurred
chipp_zanuff wrote:
the questions is: 1. why it make such error..? (e.g. tries to access non-exist folder) 2. why it doesn't create the folder by itself..? 3. should the folder created manually..? since it didn't mentioned anything in the article about that folder or even error-handling if it occurred
1. But why did you set the non-existing folder? 2. Why do you think the folder should be created by itself? Well, if you really need such a feature then ask the MySQL developers! 3. It looks like the folder should be created manually. :cool:
-
i wanna ask. i forgot my MySQL root password, so i tried to fix it based from this link: MySQL :: MySQL and Windows :: 4 Resetting the Root Password: Windows Systems[^] but it still doesn't work and there's few messages, but there's 1 error msg, i.e.:
Failed to set datadir to 'C:\Program Files\MySQL\MySQL Server 8.0\data\' (OS errno: 2 - No such file or directory)
in addition, there's also a warning i.e.:Can't create test file C:\Program Files\MySQL\MySQL Server 8.0\data\mysqld_tmp_file_case_insensitive_test.lower-test
any1 know how to fix this issue..? -
You should not be trying to create data files inside C:\Program Files, it is a protected location. Please see Where Should I Store My Data?[^].
i wasn't have you read the link that i posted? i run this command:
mysqld --init-file=C:\\mysql-init.txt
and the error occurred -
i wasn't have you read the link that i posted? i run this command:
mysqld --init-file=C:\\mysql-init.txt
and the error occurred -
chipp_zanuff wrote:
have you read the link that i posted?
I have now. And Googling the message leads to Can't create test file lower test start server mysql - Stack Overflow[^].
i've created that "data" folder, and run init command.. there was no problem... but when testing connection, the problem still the same, i.e. below pic.. error connection[^] know how to fix it?
-
i've created that "data" folder, and run init command.. there was no problem... but when testing connection, the problem still the same, i.e. below pic.. error connection[^] know how to fix it?
-
The message is self-explanatory: one or more of the IP address, port, userid or password are not valid. Check all your settings.
one or more of the IP address, port, userid or password are not valid.
?? where did you see this message..? it's not in anything in the picture i shared... the error msg is:Failed connect to MySQL bla bla bla...
-
one or more of the IP address, port, userid or password are not valid.
?? where did you see this message..? it's not in anything in the picture i shared... the error msg is:Failed connect to MySQL bla bla bla...
The message lists all the values it is trying to use to connect. So it is reasonably safe to assume that one or more of them is not correct. That is the only information you have to work with, so you need to investigate further to discover which one it is.