[Q&A] Setting MySQL root password

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Re: [Q&A] Setting MySQL root password

Postby Zia3000 » 16. November 2020 17:01

Hi there,
I am trying to set up password protection on the root password and have researched it here and on other sources.

I see that you have instructions to set the 'config' line to 'cookie'
- but should i then also update the password in the line of code two lines below that, to the password I created?

In other tutorials, it says that you also need to change that line of the code and enter the password.
So i am a bit confused and don't want to mess up my install.
grateful for any clarification you might be able to give me on this.
Thanks!
Zia3000
 
Posts: 16
Joined: 16. November 2020 05:52
XAMPP version: 7.4.11
Operating System: windows-x64

Re: [Q&A] Setting MySQL root password

Postby Altrea » 16. November 2020 17:12

You are welcome :D
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10667
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: [Q&A] Setting MySQL root password

Postby Zia3000 » 16. November 2020 17:20

Hi Altrea,
soooo...
am i supposed to just change the config to cookie ?
or also enter my new password in that code as well?
Zia3000
 
Posts: 16
Joined: 16. November 2020 05:52
XAMPP version: 7.4.11
Operating System: windows-x64

Re: [Q&A] Setting MySQL root password

Postby Altrea » 16. November 2020 17:23

This is up to you. Both will work.
If you are not the only user on this computer or worried about putting any passwords as plain text then i would prefer changing the type to cookie instead of typing the password as plain text.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10667
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: [Q&A] Setting MySQL root password

Postby Zia3000 » 16. November 2020 17:32

Ok. Thanks.
I think I understand.
If I were to enter the actual password here, it could be found by someone else using this computer by them opening the file and reading the password?
I AM the only user on this computer.
Should I also change the code that says "ALLOW_NO_PASSOWORD" to "false" instead of "true"?
would that prevent anyone from trying to log on without a password?
Zia3000
 
Posts: 16
Joined: 16. November 2020 05:52
XAMPP version: 7.4.11
Operating System: windows-x64

Re: [Q&A] Setting MySQL root password

Postby Zia3000 » 16. November 2020 17:32

P.S. thanks for your help with this!
: )
Zia3000
 
Posts: 16
Joined: 16. November 2020 05:52
XAMPP version: 7.4.11
Operating System: windows-x64

Re: [Q&A] Setting MySQL root password

Postby Altrea » 16. November 2020 17:57

Zia3000 wrote:If I were to enter the actual password here, it could be found by someone else using this computer by them opening the file and reading the password?

Correct. Any user having access to that file can read your password if it is saved in there.

Zia3000 wrote:Should I also change the code that says "ALLOW_NO_PASSOWORD" to "false" instead of "true"?

This is not neccessary in my opinion. It would prevent users to login without password. But you already setted the root password, so the only user left is the anonymous user which only has permissions to the test database.
And xampp added some extra security because phpmyadmin cannot get used from any other computer then your very own xampp server.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10667
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: [Q&A] Setting MySQL root password

Postby Zia3000 » 16. November 2020 18:05

Altrea wrote:
Zia3000 wrote:If I were to enter the actual password here, it could be found by someone else using this computer by them opening the file and reading the password?

Correct. Any user having access to that file can read your password if it is saved in there.
ok. Thanks for confirming.

Zia3000 wrote:Should I also change the code that says "ALLOW_NO_PASSOWORD" to "false" instead of "true"?

This is not neccessary in my opinion. It would prevent users to login without password. But you already setted the root password, so the only user left is the anonymous user which only has permissions to the test database.
And xampp added some extra security because phpmyadmin cannot get used from any other computer then your very own xampp server.

This is good to know.
Zia3000
 
Posts: 16
Joined: 16. November 2020 05:52
XAMPP version: 7.4.11
Operating System: windows-x64

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 107 guests