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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:39:14+00:00 2026-06-03T02:39:14+00:00

I’m really having a strange Issue here, and it’s really starting to annoy me.

  • 0

I’m really having a strange Issue here, and it’s really starting to annoy me. It’s about the different behaviour of connections. I’m just trying to set up CakePHP, but the PDO cant conenct to the mysql Server.

Okey, step by step: It’s a fresh computer, I just installed XAMPP (on Win7) and downloaded CakePHP. Nothing else was done. On phpMyAdmin, I created a user ‘test’ with PW ‘test’ and he owns the Database ‘test’. Simple, right?

Here, the row of the User / Rights table in phpMysqlAdmin:

User Host Password Global Rights GRANT
test %    Yes      USAGE         No

Now, to the real Issue:

This works:

$link = mysql_connect('localhost', 'test'); //<- not using the 3. parameter, 'password'

But, what should work, doesnt:

$link = mysql_connect('localhost', 'test', 'test'); //<- using the 3. parameter, 'password'

And since I cant seem to ‘remove’ the ‘using Password: YES’ for PDO’s, I cant connect with PDO’s either (and cake Uses PDO’s):

$dbh = new PDO('mysql:host=localhost;dbname=test', 'test', 'test');

Error Messages:

Error!: SQLSTATE[28000] [1045] Access denied for user
‘test’@’localhost’ (using password: YES)

It cant be so complicated, I just want to connect to a freshly installed DB, with the correct credentials. What am I doing wrong? I read trough many similar Questions, but didnt find a solution for my own Problem.

And yes, the password really is ‘test’ – I have no idea why the mysql_connect() whitout PW, can connect – is it using the username as PW by default?

This really cant be that hard

Thanks for the help,
Wish you a nice day.

EDIT (answer to question)

Here the entry for the DB rights (in user: test): – the user really seems to have all rights for DB ‘test’

Database Rights         GRANT 
test     ALL PRIVILEGES Nein
  • 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-03T02:39:16+00:00Added an answer on June 3, 2026 at 2:39 am

    GRANT ALL ON test.* TO test@localhost IDENTIFIED BY "test";

    Run the above query at the mysql shell and everything should work.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.