Using PHP with MySql
Posted: Tue May 15, 2012 10:29 pm
I have installed wamp server(apache, mysql, php for windows). It installs phpMyAdmin. When I try to open phpMyAdmin, it gives an error
"Error
MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server."
I was never asked to setup username or password, then why am I getting such an error ?
Secondly, when I have to use a database with php, it asks for database user and database password. What is this user and password ? When I create a database, I dont provide a username or password for this database. So how can I get this ?
I already had MySql installed on my computer. So how does this affect new installation of MySql with wamp ? How do I know which MySql am I using ? New one or already existing one ?
"Error
MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server."
I was never asked to setup username or password, then why am I getting such an error ?
Secondly, when I have to use a database with php, it asks for database user and database password. What is this user and password ? When I create a database, I dont provide a username or password for this database. So how can I get this ?
I already had MySql installed on my computer. So how does this affect new installation of MySql with wamp ? How do I know which MySql am I using ? New one or already existing one ?