If you have the wrong password and need to be corrected, run the GRANT
statement to provide access to the user of your database:
GRANT ALL PRIVILEGES ON aTable.* TO xxx@localhost IDENTIFIED BY 'password_for_xxx';
The foregoing provides all privileges. Often it is better to limit only what is needed. For example, if you only intend to SELECT, but do not modify the data,
GRANT SELECT ON aTable.* TO xxx@localhost IDENTIFIED BY 'password_for_xxx';
Update
Since you defined the database name as dedbmysql
, change your mysql_select_db()
call to:
$db = mysql_select_db("dedbmysql", $con);
After that, the above GRANT
statements are probably not needed, since your host has already developed the correct database permissions.
Michael berkowski
source share