Could not connect Mysql database

How to use phpmyadmin.... phpmyadmin related arguments. Even phpMyAdmin issues

Moderators: egami, macek, gesf

Post Reply
seandisanti
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Sat Apr 26, 2014 8:08 am

a few things:
1) mysql_ functions are deprecated because they are slow and insecure. You should be using PDO or mysqli_ functions at the very least.

2) redacting the ip address and username in the code is less effective when you leave it in the error message :D

3) the error message you're getting lets you know that your attempt was explicitly denied by the server, that tells you that it's not a communication issue because you're receiving the response.

Most likely your user is not setup and given permissions in the database. if you have mysql console access, you can give permissions by going into console and typing the following commands:

use mysql;
GRANT ALL privileges on database_name to to username identified by password('password');

if you don't have console access, you're probably going to have a setting in cpanel for mysql databases and database users. in that interface you have to create a user, and then explicitly link them to a database and select permissions. I'm sure there are other interfaces also, so let me know if you're still having issues (and remove your info from the quoted error message)

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Mon Apr 28, 2014 8:23 am

No problem, I'm glad to hear it

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests