0
I am having difficulties connecting sql database from xampp to vs code.If you have any links to tutorials you can post them here
My vs code is displaying errors everytime I try to connect to xampp database.
4 Answers
+ 2
Prime, check your user right, what you got was an access denied error, meaning you do not have access to the desired resource. Check your database connection configuration and ensure you are using a valid username & password to establish the connection.
I would emphasize on the username & password because part of that error message says "Access denied for user ''@'localhost' (did you notice the empty username?).
Next, if you have checked for that; move on by checking for granted privileges for that particular user, on the database 'data1'. If you are uncertain about privileges modification please leave it be, I hope it wasn't the problem.
Hth, cmiiw
+ 1
A few extra information that might help finding a solution:
- The error message from VSC.
- Your code, in particular the part that connects to the XAMPP DB server.
- DB server service status (running, paused, stopped).
- Credential validity, your access to the DB server (is username & password correct, enough privileges granted).
I gotta be honest, I have no experience combining XAMPP with VSC, so I'm here to help improve this question by suggesting additional information that can help the community to isolate the problem, and hopefully find a viable solution soon.
Good luck! đ
+ 1
It gives me an error message saying, "Error opening connection ER_DBACCESS_DENIED_ERROR:Access denied for user "@'localhost' to database 'data1'. I am trying to connect through SQLTools settings in VS code.
0
Thank you.Your latest answer gave me a lot of insight.I had not correctly configured the username and the password on xampp