Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I move files from

C:\wamp\bin\mysql\mysql5.1.36\bin

to

C:\windows\system32

So that I could automatically use mysql commands without setting the paths.

share|improve this question

migrated from stackoverflow.com Aug 5 '10 at 7:37

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 5 down vote accepted

It's better to set the path enivironment variable itself to include the MySQL bin directory, than to move its contents to another directory already in the path. You don't say which version of Windows you're using. On XP you want to

  1. From the desktop, right-click My Computer and click Properties.
  2. In the System Properties window, click on the Advanced tab.
  3. In the Advanced section, click the Environment Variables button.
  4. Finally, in the Environment Variables window (as shown below), highlight the Path variable in the Systems Variable section and click the Edit button. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.

Google for other versions of Windows (if it's not the same as above).

share|improve this answer
1  
thanks man..... –  soul Aug 6 '10 at 1:15

In general, moving files out of install directories is not the best idea as the upgrade/uninstall programs will not know where you've move them. It then becomes a burden on YOU to figure out the right course of action.

Better to adjust the PATH environment variable.

share|improve this answer

Use the PATH variable. A former employer used to set up their standard workstations to copy java.exe to windows\system32 to reduce help desk calls. It is a giant PITA to debug that a few months down the line and all of a sudden your upgrades don't seem to be working.

My personal approach is to nest the paths like so:

MY_SQL_5_HOME = C:\wamp\bin\mysql\mysql5.1.36\
MY_SQL_6_HOME = C:\wamp\bin\mysql\my-sql-6-path
MYSQL_HOME=%MYSQL_5_HOME%

PATH=%MYSQL_HOME%\bin;(etc)

Then if you want to switch between versions, you can swap the settings of MYSQL_HOME.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.