skip to Main Content

I have a php script that (in theory) connects to a database. The issue is that when I try to test my script in http://phptester.net/ it tells me that said credentials are wrong.

enter image description here

I am fairly new to this whole php and mysql set up but this is what I know thus far:

  1. I have a domain registered @ godaddy.com with hosting (obviously)
  2. I used their Database Interface to create my first database (I called it myProfile)
  3. I also used their interface to create a user and added that user to the database with all its privileges

Here is where the issue lays:
I go to Databases link in my cPanel page and see my database WITH my user and you can see its privileges:

enter image description here

enter image description here

Now, I go to phpMyAdmin in godaddy and I find that there is indeed the myProfile database but I can’t find the user I created.

enter image description here

I see a user that I never ever seen before but no matter what I do in phpMyAdmin I can’t ADD, CREATE, GRANT PRIVILEGES or do anything user related. I even tried looking up in a query to see if the one I created on the interface shows up. But nothing works!

enter image description here

enter image description here

Can anyone help me with this conundrum?

2

Answers


  1. Your host likely doesn’t accept incoming connections from anywhere but 127.0.0.1. Even if it does, it shouldn’t accept those requests unless they’re encrypted.

    Therefore, PHPTester.net fails – not by any deficiency, just because Godaddy is using default/recommended/smart security settings to disallow these remote connection attempts.

    Why not try testing the database connection by opening a browser window pointed at the connection page you’re showing us?

    Login or Signup to reply.
  2. I dont really get lucas’s answer but after creating a user you have to explicitely assign the user to the database.

    Here is how its done from CPANEL -> Databases -> MYSQL Databases

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search