Forum Moderators: coopster
I just want to ask about this error report
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mysql_user'@'localhost' (using password: YES) in W:\www\um\database2.php on line 2
Could not connect: Access denied for user 'mysql_user'@'localhost' (using password: YES)
How to overcome this error?
And what i suppose to do using phpmyadmin?
I really don't know what is the purpose of phpmyadmin?
and i just copy this script and save as database.php then i go to localhost/um/database.php but there is a warning.
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$result = mysql_query($query);
if (!$result) {
die('Invalid query: ' . mysql_error());
}
$sql = 'CREATE DATABASE my_db';
if (mysql_query($sql, $link)) {
echo "Database my_db created successfully\n";
} else {
echo 'Error creating database: ' . mysql_error() . "\n";
}
?>
do i need to change it?
please help me
thanks,
phpMyAdmin is a very handy utility for manipulating database table structure and content. With it you can create/modify/delete tables and insert/modify/delete data in the tables. You can use it to create backups (export) or restore from backups (import). If the user under which you're running it can create databases, then you can also do that with it, and you can add users to the databases.