-1

I want to connect mysql database to a project in netbeans. I tried few ways but while running the application i am getting error as

u Access denied for user 'User'@'localhost' (using password: YES) 
I think my way of connecting may be wrong. Give me information regarding that. My localhost is running in 8080 and mysql which i connected is running in 3306 port. Can anyone give exact steps for connecting database to my applicaiton
krocks
  • 199
  • 1
  • 2
  • 15

1 Answers1

1

If you want to connect Mysql database with NetBeans then please follow below steps.

1. In the Services window you can right click on the Databases tab and select New Connection.

2. Select MySQL(Connector/J Driver) from the drop-down list. The driver file should be listed in the window. If not, you can download the file, then click add and select it from your hard drive.

3. Finally enter your database details such as servername, username and password and click finish.

for more detail check HERE

For PHP check this link connect it with your PHP application

Let me know in which language you are trying to connect mysql database?

Community
  • 1
  • 1
Ranish Karim
  • 366
  • 1
  • 8
  • I followed the same process but getting same error as before – krocks Mar 08 '16 at 08:56
  • have you verified the password of that user from mysql database? and also do that user has permission of localhost? – Ranish Karim Mar 08 '16 at 09:02
  • after creating database who to linkup with application (without using code) – krocks Mar 08 '16 at 09:07
  • by default root user has permission of all databases. Please try to connect your application with root user and use same password which you use to open phpmyadmin. If you have created new database user then give permission to that user. You can find detail in this link https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql – Ranish Karim Mar 08 '16 at 10:00