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 7800519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:39:52+00:00 2026-06-02T00:39:52+00:00

I can connect to my mysql db using php without a password fine. However,

  • 0

I can connect to my mysql db using php without a password fine. However, when I add a password in phpmyadmin I can no longer connect. I consistently get the error of:

"Could not connect: Access denied for user 'admin'@'localhost' (using password: YES)"

I’ve tried using both settings of MySQL password 4.0 and 4.1+ with the same results.

mysql_connect ("127.0.0.1", "admin", "password") or  die('Could not connect: ' . mysql_error());;
mysql_select_db ("datatable");

Does anyone have an idea of what may be going on here?

EDIT: I can access it if I turn off the password. There seems to be some misunderstanding

  • 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. Editorial Team
    Editorial Team
    2026-06-02T00:39:54+00:00Added an answer on June 2, 2026 at 12:39 am

    This might help

    steps-

    1. go to phpmyadmin;
    2. click on the database you want to change the pw to (onl left);
    3. click on “privileges”;
    4. click on the “edit privileges” icon on the right of the root user for localhost.
    5. go to the “change password” block;
    6. tick the “password” radio button;
    7. enter password and re-type that password;
    8. tick: … keep the old one.
    9. click “go”;
    10. now go open a MySql Console from the WAMPSERVER menu;
    11. it will ask you for a pw – just hit the return since you don’t have one yet (next time you go to the console you’ll need to enter the new pw that you’r entering here).
      type the following:

      UPDATE mysql.user
      SET Password=PASSWORD(“xxxxxx”)
      WHERE User=”root”;
      (where xxxxxx is the password you entered in the previous step).

    12. Now type:
      FLUSH PRIVILEGES;

    13. go to your WAMP or MAMP folder, find the APPS folder, and than click on your PHPMYADMIN folder ( e.g my folder called phpmyadmin2.11.6 ) and find the config.inc.php

    14. open config.inc.php with wordpad and find the following text:

    $cfg['Servers'][$i]['password'] = '';

    now add the password that you used in step number 3 like this :

    $cfg['Servers'][$i]['password'] = 'yourPasswordHere';

    1. now save this modification, and close config.inc.php

    You should be all set now!

    Source – http://www.knowledgesutra.com/discuss/tsilti-php-myadmin-access-mysql-database.html

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

Sidebar

Related Questions

I wonder how can I get the list of MySQL databases in PHP using
I am getting the error: Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server
I've been recently trying to connect to a hosted MySQL using Java but can't
How can I connect to a MySQL database that requires an SSH tunnel using
I am trying to get Ajaz to pull data from mysql using a php
I am trying to connect to MySQL DB using php script. But I don't
I have been trying to connect to mysql all evening using PHP. I know
A client is using PHP to connect to MySQL. The PHP scripts and the
trying to get my first little PHP script to connect to a local mySql
I get a random row from a mysql-server using php. I then display some

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.