Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 33391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T13:54:48+00:00 2026-05-10T13:54:48+00:00

I am getting the following error: Access denied for user ‘apache’@’localhost’ (using password: NO)

  • 0

I am getting the following error:

Access denied for user ‘apache’@’localhost’ (using password: NO)

When using the following code:

<?php  include('../includes/connect.php');  $query = 'SELECT * from story';  $result = mysql_query($query) or die(mysql_error());  echo '<h1>Delete Story</h1>';  if (mysql_num_rows($result) > 0) {     while($row = mysql_fetch_row($result)){           echo '<b>'.$row[1].'</b><span align='right'><a href='../process/delete_story.php?id='.$row[0].''>Delete</a></span>';       echo '<br /><i>'.$row[2].'</i>';     } } else {    echo 'No stories available.'; } ?> 

The connect.php file contains my MySQL connect calls that are working fine with my INSERT queries in another portion of the software. If I comment out the $result = mysql_query line, then it goes through to the else statement. So, it is that line or the content in the if.

I have been searching the net for any solutions, and most seem to be related to too many MySQL connections or that the user I am logging into MySQL as does not have permission. I have checked both. I can still perform my other queries elsewhere in the software, and I have verified that the account has the correct permissions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T13:54:49+00:00Added an answer on May 10, 2026 at 1:54 pm

    And if it matters at all, apache@localhost is not the name of the user account that I use to get into the database. I don’t have any user accounts with the name apache in them at all for that matter.

    If it is saying ‘apache@localhost’ the username is not getting passed correctly to the MySQL connection. ‘apache’ is normally the user that runs the httpd process (at least on Redhat-based systems) and if no username is passed during the connection MySQL uses whomever is calling for the connection.

    If you do the connection right in your script, not in a called file, do you get the same error?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

on the following ajax code iam getting a Access is Denied error message.Can somebody
Hi I'm getting the following error: Access restriction: The type MainFrame is not accessible
I am getting the following error when I try to access bins private member
I am getting following error when I am trying to get WebResponse using WebResponse
I am getting following error message when using Doctrine ORM in Codeigniter. ( !
I am getting an 'access is denied' error when I attempt to delete a
I'm getting a very strange error, I've created a user 'testuser' with the following
I am getting the following error: Open OLE error code:80004005 in Microsoft OLE DB
Am getting following error message on calling WCF service: The formatter threw an exception
I am getting following error in different places like when I am removing an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.