Setting PATH for MYSQL bin

MYSQL PATH!

Yes, that thing come to my mind when I playing around with MYSQL.

Before setting PATH :

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>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 1
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> exit
Bye

After Setting PATH :

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>mysql
ERROR 1045 (28000): Access denied for user ‘ODBC’@’localhost’ (using password: N
O)

C:\Documents and Settings\Administrator>mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
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>

I love that 🙂

To add the PATH :

  1. Right click on My Computer icon
  2. Choose Properties -> Advance
  3. Click Environment Variables
  4. Click Edit at PATH section

Add : c:\wamp\bin\mysql\mysql5.1.36\bin;

in variable value.

Click OK.

Finish 🙂

Tags: