Jump to content

Resolved - SQL error


sasan223

Recommended Posts

I was trying to access my site, and the following errors appeared:

how can I fix this?

Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'atisonir_admin'@'localhost' (using password: YES) in /home/atisonir/public_html/classes/db/mysqli.class.php on line 30

Warning: mysqli_options(): Couldn't fetch mysqli in /home/atisonir/public_html/classes/db/mysqli.class.php on line 32

Fatal error: Access denied for user 'atisonir_admin'@'localhost' (using password: YES) in /home/atisonir/public_html/classes/db/mysqli.class.php on line 35

Link to comment
Share on other sites

I ran into this after making a fresh install to a fresh database. Since it's all on a simulated production server, it is up to me to make sure that the database server has a username and password installed in its userbase. Generally, the hosting provider has the hosting control panel (cPanel?) manage this automatically.

Then, that user must be permitted to access the database from certain locations: from anywhere, from a specific range of IP addresses, or from 'localhost'.

The information cPanel gives you about accessing the database by your web app is all there. Then, in the database server, a database is created. The user is given permission to access that database. Again, all this is by the hosting provider or cPanel.

So, the web app needs the name of the database, the name of the host where it is at, a username and a password. In the faulting installation, I had the user authorized to access the database from 'localhost' while my web app was calling the computer's IP address.

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...