I can not access the database with Mysqli_connect(). I have all the correct information into the funciton but it wont let me. This is the syntack that I use

$link = mysqli_connect("hostname", "username", "password", "db_name");

I get this error

10-01 22:20:27.182: E/JSON(8700): <br />n<b>Warning</b>:  mysqli_connect() [<a href='function.mysqli-connect'>function.mysqli-connect</a>]: (42000/1044): Access denied for user 'username'@'%' to database 'db_name'

Recommended Answers

This may not be the right question to ask you, but do you have mysql installed in your computer? Also, have you tried using single quotes? Has that made a difference?

Note: I am also a "newbie" learning mysql, so we technically are learning together ;)

Jump to Post

All 3 Replies

This may not be the right question to ask you, but do you have mysql installed in your computer? Also, have you tried using single quotes? Has that made a difference?

Note: I am also a "newbie" learning mysql, so we technically are learning together ;)

Thanks for answering at least! lol but I am using a web host so I dont need it on my computer but I have not tried single quotes I can give it a whirl though.

Okay, so I am guessing you have tried out the single quotes by now? How did that go?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.