#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    6
    Rep Power
    0

    How to set command prompt to automatically cd into Mysql dir


    I know this is really a n00b question i just started using mysql. How do i make it easier for me to cd into my mysql directory without having to go an copy and paste into command prompt.
  2. #2
  3. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,754
    Rep Power
    9397
    Less a MySQL question, more about your command line/terminal.

    What OS and what are you trying to do in the mysql directory?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    6
    Rep Power
    0
    Originally Posted by requinix
    Less a MySQL question, more about your command line/terminal.

    What OS and what are you trying to do in the mysql directory?
    windows 8 command prompt latest version of mysql

    Whenever i work in mysql i have to cd into this dir.
    C:\Program Files\MySQL\MySQL Server 5.6\bin
    soo.. i dont know why your asking me what i need to do. when anytime you use mysql your suppose to login and use this command
    Mysql -uroot -proot
    ...
  6. #4
  7. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,754
    Rep Power
    9397
    Don't connect as root unless you need to create databases or manage users.

    1. WinKey + I, PC Info
    2. Advanced System Settings on the left
    3. Environment Variables (button in the Advanced tab)
    4. Create a new user variable named "PATH" with the value "%PATH%;C:\Program Files\MySQL\MySQL Server 5.6\bin". If there's one already there then add to it everything from the semicolon on.
    5. Close all the windows and your command prompts.
    6. Start a new prompt and try just "mysql -uroot -proot" - without changing directories.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    May 2004
    Location
    surfing the interwebz
    Posts
    2,408
    Rep Power
    2004
    You can also do the following:

    1. Type CMD (Windows search should find the command prompt command).

    2. Right click on CMD and select properties

    3. In the Shortcut tab select "Start In" and adjust it to the value you want.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    6
    Rep Power
    0
    just wanted to thank you all for everything!

IMN logo majestic logo threadwatch logo seochat tools logo