Connection problem with DB

Hello, I am trying to connect to my database but no thing is working…
it’s not connecting.

			$con=new mysqli("MY SQL SERVER","MY USERNAME","MY PASSWORD","DB NAME");

when i use this command, it doesn’t connect…

Actually filling in the configuration parameters would help a lot. As long as those are correct in the actual script, everything should work fine.

@Admin said:
Actually filling in the configuration parameters would help a lot. As long as those are correct in the actual script, everything should work fine.

I did this but it doesn’t connect

What do you mean by “doesn’t connect”? What is the exact error message you see?

@Admin said:
What do you mean by “doesn’t connect”? What is the exact error message you see?

No errors, When I connect normal but no response that is been connected.

Then you should debug your code first. Try to see if you can retrieve any connection errors or verify whether the connection is established in the first place. So far, I haven’t heard anything that indicates a server issue.

Having the same issue. When I print_r the mysqli object I get
mysqli Object ( [affected_rows] => [client_info] => [client_version] => 50012 [connect_errno] => 1045 [connect_error] => Access denied for user ‘rfgd_20348106’@‘192.168.0.41’ (using password: YES) [errno] => [error] => [error_list] => [field_count] => [host_info] => [info] => [insert_id] => [server_info] => [server_version] => [stat] => [sqlstate] => [protocol_version] => [thread_id] => [warning_count] => )

[connect_errno] => 1045 [connect_error] => Access denied for user 'rfgd_20348106'@'192.168.0.41' (using password: YES) looks like the important part.

The params I am using come straight from the mysql database management page.
My code looks like

<?php $servername = "sql302.rf.gd"; $username = "rfgd_********"; $password = "********"; $marketsDBName = "rfgd_20348106_market"; $market = new mysqli ( $servername, $username, $password, $marketsDBName ); print_r($market); I can give the PW and account name, but I'm not going to post it on open forums.

@ligraph I’m not sure whether you actually have the same issue. But in your case, the password in your database configuration does not match the account password in your client area. Setting the correct database password should fix the issue for you.