Link to home
Start Free TrialLog in
Avatar of sargent240
sargent240Flag for United States of America

asked on

Netbeans database password change

I have moved a netbeans project from one computer to another.  Everything is being recognized properly but when I run the project in net beans I get the error saying

Access Denied for user 'auction'@'localhost' (User password: Yes)

I imagine somewhere in a file netbeans has the username for the database.  I need to be able to change it as there is no user name of 'auction' on the new computer.  The user name 'auction' is what was used on the computer the project and database came from.  Thanks!

Cheers - Al
Avatar of Bruce Smith
Bruce Smith
Flag of United States of America image

What kind of project is it? It will probably be in the Run Configuration settings or the web.xml file. More than likely web.xml file.
Avatar of sargent240

ASKER

It is not a web application.  It is a java application
Sorry, It is not a web.
I have two xml files on the computer.  Looking in each on, they contain the number 60 and that is all that is there.  Any Ideas, Thanks.
Okay, then it will not be in an xml file. The password could be located in one of the classes or it could be located in the properties of a pre-configured database. You can view the pre-configured services databases and by right-clicking on them, you can view their properties. Here is where that will be:
 User generated image
If it's not a pre-configured services database  I would suggest downloading JEdit (http://www.jedit.org/index.php?page=download) as you can search within all files/classes of the directory of your project for the word "auction" so you can replace it with your new username.
If I go to the spot you are suggesting

     jdbc:mysql://localhost:3306/music[root on Default Scema]

and right click and select properties the fifth item from the top of the properties box says.

    User             root

and root is greyed out.  I see no reference to 'auction'.
ASKER CERTIFIED SOLUTION
Avatar of Bruce Smith
Bruce Smith
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
can I search the entire project for the word auction
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think I found what I need in persistence.xml.  Can I just edit the file?
Bingo my friend.  I edited the persistence.xml file to reflect the new user and it worked.  Thank you for your help and have a Merry Christmas.
Cheers!
You're welcome. You too!
First class help on Christmas Eve.