sargent240
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
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
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.
ASKER
It is not a web application. It is a java application
ASKER
Sorry, It is not a web.
ASKER
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:
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 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.
ASKER
If I go to the spot you are suggesting
jdbc:mysql://localhost:330 6/music[ro ot 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'.
jdbc:mysql://localhost:330
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
can I search the entire project for the word auction
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think I found what I need in persistence.xml. Can I just edit the file?
ASKER
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!
Cheers!
You're welcome. You too!
ASKER
First class help on Christmas Eve.