Password Help for MySql with Xampp

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

Password Help for MySql with Xampp

Postby nstreet » 10. January 2014 10:43

I have installed Xampp, the latest version, but I want to change or add a password.

As I run this coding I get the Error 1045 that is shown on these forums.

I am very, very new to databases. I learned the basics of DOS in grade school but have no additional experience.

I am looking to learn PHP through a book: "PHP for the web: Visual Quickstart Guide (4th Edition)

In the book it suggest downloading XAMPP, which I did.
I turn on MySql but and given a suggestion by the book and all over the internet to change my password.

I try to follow the book:
>C:\mysql\bin\mysql -u root -p

I then get an area to change the password. When I create a password I get: Error 1045 (2800) Access Denied for user 'root@localhost' (using password: yes)

I have looked all over the internet for a way to fix this. Most answers are too techy for me to seem to understand or input or the answers seem to be using Lenix coding. I am running Windows 7. Can you give me answers for:
1) Why a password needs to be set up?
2) How to actually, basically, set up the password.

Some explanation suggest I go to a web browser and in the address bar search localhost. I do this but nothing comes up. I do not know if this has anything to do with the answer I am seeking but I wanted to add this little bit of information.
nstreet
 
Posts: 3
Joined: 10. January 2014 10:37
Operating System: Windows 7

Re: Password Help for MySql with Xampp

Postby Nobbie » 10. January 2014 11:15

nstreet wrote:I try to follow the book:
>C:\mysql\bin\mysql -u root -p


Without any knowledge about MySQL rights this is quite dangerous.

nstreet wrote:I then get an area to change the password.


What do you mean by "area"?? You simply get a prompt of the MySQL Interpreter, nothing else.

nstreet wrote:When I create a password I get: Error 1045 (2800) Access Denied for user 'root@localhost' (using password: yes)


No, no, not so quick.

a) What did you enter precisely to the MySQL prompt (in order to create a passwort)?

b) When (exactly) did you receive that error message?


Maybe you already destroyed your Xampp installation with these few steps, if you do not remember by 100% what you entered there, you ruined your root account of MySQL.

nstreet wrote:1) Why a password needs to be set up?


There is no need, who tells you so? Ask him! Xampp comes without password and it is ready to run out of the box. Passwords are needed for multiuser environments and or online environments to prevent other people to overtake the control of your server. But this is not a threat on a private single user PC.

nstreet wrote:2) How to actually, basically, set up the password.


Obviously, when you say "the password", you actually mean the passwort of the User "root" from the MySQL Installation. Beware: MySQL Users are not the same users as windows users! This is a completely different context.

The one and only administration tool for you (running Xampp) is "PhpMyAdmin", which is part of the Xampp Installation and there is a link in the Xampp Menu to run it in your browser. DO NOT RUN MYSQL Interpreter natively without any knowledge of what you are doing there!

nstreet wrote:Some explanation suggest I go to a web browser and in the address bar search localhost.


Ouch!! That means that you either did not install Xampp correctly or did not start Apache. You have to start Apache (and MySQL) in the Xampp Control Dialog.

It seems, you have no idea what Xampp does and what it is good for. You should not go for any passwords (this is for advanced users only), as long as you have no idea about using Xampp.
Nobbie
 
Posts: 13180
Joined: 09. March 2008 13:04

Re: Password Help for MySql with Xampp

Postby nstreet » 10. January 2014 11:19

Fair enough...I have no idea what I am doing. That if true.

As far as the password area it looks like this:
>C:\mysql\bin\mysql -u root -p
Password:

This is where I put a password.
nstreet
 
Posts: 3
Joined: 10. January 2014 10:37
Operating System: Windows 7

Re: Password Help for MySql with Xampp

Postby nstreet » 10. January 2014 11:22

To be honest - This is the first time from anywhere that I have read that I DO NOT need a password. I actually quit like this. The idea of a password has been hell.

I simply want to learn PHP so that I can follow my developers who are creating websites for us and see what they are doing as well as make minor changes. If I can do this all without getting some kind of password or handling extras like my password in MySql I am happy.
nstreet
 
Posts: 3
Joined: 10. January 2014 10:37
Operating System: Windows 7

Re: Password Help for MySql with Xampp

Postby JJ_Tagy » 10. January 2014 12:39

So in your guide, anytime it tells you to use -p , just ignore it. With a new XAMPP installation, you can just use mysql -uroot

Beware, that if your guide tries to open up for external connection, all of this is insecure.
JJ_Tagy
 
Posts: 788
Joined: 30. January 2012 13:44
XAMPP version: 5.5.15
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 117 guests

cron