Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9086017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:23:07+00:00 2026-06-16T21:23:07+00:00

.bashrc says: PATH=$PATH:/usr/local/mysql/bin/:$HOME/.rvm/bin # Add RVM to PATH for scripting but mysql -u root

  • 0

.bashrc says:

PATH=$PATH:/usr/local/mysql/bin/:$HOME/.rvm/bin # Add RVM to PATH for scripting

but mysql -u root returns

-bash: mysql: command not found

but if I do /usr/local/mysql/bin/mysql -u root
everything works fine. Why isn’t it search using PATH?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:23:11+00:00Added an answer on June 16, 2026 at 9:23 pm

    You need to either use:

    export PATH=$PATH:...
    

    Or add the export PATH statement after this statement.

    The changes you are making are not surviving beyond the execution of your .bashrc. Adding export before your assignment (or export PATH) later will ensure that your changes are exported to your shell’s child processes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this .bashrc file #PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting [[
I've got the following variable set in my cygwin $HOME/.bashrc PATH=/bin:/usr/sbin:/cygdrive/c/Program Files/Java/jdk1.6.0_26/bin:$PATH Problem is
I have the following on my .bashrc : JAVA_HOME=/usr/bin/java GRAILS_HOME=/root/grails PATH=$PATH:$JAVA_HOME:$GRAILS_HOME/bin export JAVA_HOME export
I add this line to /home/{user}/.bashrc file: export JAVA_HOME=/usr/lib/jvm/java-6-openjdk but when I want to
While I try to set java path on ~./bashrc file i exported like: PATH=/usr/local/jdk1.6.0/bin
I want to add the following line to ~/.bashrc: export PATH:/var/lib/gems/1.9.1/bin:$PATH But only if
I need to add this to .bashrc echo '[[ -s $HOME/.rvm/scripts/rvm ]] && .
.bashrc (on user account): export PATH=/usr/bin:$PATH How can I get Git to work on
In my ~/.bashrc: export CLASSPATH=~/mysqljdbc/mysql-connector-java-5.1.21-bin.jar CLASSPATH var is correct: ray@ubuntu:~$ echo $CLASSPATH /home/ray/mysqljdbc/mysql-connector-java-5.1.21-bin.jar Trying
I have the following entry in my .bashrc : PATH=$PATH:/home/user/abc/bin;export PATH; # ADDED BY

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.