Jump to content

[Solved] Php Database Connect Denied


rsmartapps

Recommended Posts

Hello dear team,

 

I am a grateful user to use your services. They are great to people like me.

 

I'm trying to connect to my database (mysql) through a php script, but I'm replied with this:

Access denied for user 'rsmartap'@'localhost' (using password: YES)

Please could you point me in the rigth direction?

 

Point that I'm login correctly through phpMyAdmin.

 

I hope you guys can sort this out.

 

Regards,

Ruben

 

Link to comment
Share on other sites

Hello wolstech,

 

That worked thanks you very much, took me a while because I'm not used to this panel but works perfecty when I connect remotely, but when I do it through my script does not work.

 

$mysqli = new mysqli('localhost', 'rsmartap_php', 'password', 'rsmartap_encuesta');
if($mysqli->connect_errno) {
die('No pudo conectarse: ' . mysql_error());
}

 

Here are part of the script.

I'm doing something wrong?

Shall I code this in a different way?

 

Please remmember that I'm learning.

 

Regards,

Rsmartapps

Link to comment
Share on other sites

Yes, I added the user to the database and gave full permissions.

 

To check if I could connect from home I added my ip, so I connected with the same user/password successfully.

 

I don't know what else try.

 

I will make sure the typography to ensure there are not mistakes.

 

Expecting to find out what I'm doing wrong.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...