setting a password for user ‘root’ : wampserver way

When You open phpmyadmin from wampserver you’ll see message :

Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user ‘.root’.

To change the password just follow this technique.

MySQL version used by Wampserver depend on its version.

Technique I (visual way)

1. Open phpmyadmin
2. Click Privileges

3. Click Edit icon in same line where host “localhost” located.

change_mysql_root_password_on_windows : Click Edit icon in same line where host "localhost" located

4. Enter password by type it inside number 1 and 2 ( see picture)

change_mysql_root_password_on_windows : enter password

Click Go and you’re done.

Technique II (command prompt)

Open command prompt by click :

Start -> Run

Type ‘cmd’ and hit Enter.

change_mysql_root_password_on_windows : use password

type following command :

(I mark the command in bold)

C:\wamp\bin\mysql>cd c:\wamp\bin\mysql\mysql5.1.36\bin

C:\wamp\bin\mysql\mysql5.1.36\bin>mysql -uroot -p

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.1.36-community-log MySQL Community Server (GPL)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> use mysql;

Database changed

mysql> update user set password=password(‘typenewpasswordhere’) where host=’localhost’;

Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> flush privileges;

Query OK, 0 rows affected (0.01 sec)


Whatever technique you want to use, you should change the password as suggested by phpmyadmin.

See you in other post.

Stay health!