Showing posts with label Mysql. Show all posts
Showing posts with label Mysql. Show all posts

WAMP Server: Mysql login Error (Cant open phpmyAdmin)

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

This is very common error encountered while using WAMP server , its because you have not set mySql password and you need to set it first!

Solution :

1) Go to C:\wamp\bin\mysql\mysql5.1.36\bin\
2) mysql.exe -u root -p
3) mysql>
4) Type this query :
     update mysql.user set password=password('1234') where user='root';
5) flush privileges;
6) That's it! now u set password 1234 to mysql.
7) Now whenever you will establish connection with mysql from php pages you will need to provide this password 1234


Thank You,
Have A Nice Day!

Mysql Basic

  1. Start mysql from start menu
  2. It will ask you password just enter whatever you specified while installing mysql.
  3. you get mysql> prompt
  4. To view available databases fire up : show databases;
  5. To select database fire up : use databasename;
  6. To show created tables in mysql fire up : show tables;
Very small introduction for connecting to mysql database! rest you can execute your own queries there on prompt...


My SQL Frequent commands :

Reset MySQL password

Some days back  i just forget this password for Mysql and there is very easy way to reset this password, simply follow below steps : (Windows XP)

  1. Go to control panel > administrative tasks > services
  2. Select mysql service from right pane
  3. right click on it and 'STOP' the service
  4. There is a way to start the server with special init file which you can create as follows :
UPDATE mysql.user SET Password=PASSWORD('girish') WHERE User='root';
FLUSH PRIVILEGES;

  • Copy above 2 lines and paste it in notepad and save this file as  : mysqlpwdreset.txt 
  • Now fire up : C:\mysql\bin\mysqld-nt --init-file=C:\\mysqlpwdreset.txt
For More Information Click here
Thats it! Now Fire up your mysql and enter this new password !
Thank You,