Basic MySQL PATH question
In the Terminal prompt, I have to type in $ PATH=/usr/local/mysql/bin:$PATH to run MySQL commands.
Where do I need to save this path in th开发者_StackOverflow中文版e MySQL files, such that I don't need to type in this path every time I enter into the terminal path. What file, and where should I type this in?
Thank you.
Where can I find the .bashrc file? when I do a cd ~, then ls -a, it does not show up (although I do see a .bash_history.)
You don't have to save $PATH
in mysql, you need to save it in your .profile
or .bashrc
(substitute for your own shell if not Bash) files, found in your home directory.
You have files like these without the dot in frontne in /etc
, but they're the system wide ones (they are the default to all users). You should have a file .bashrc
or .profile
(or you could create them if they don't exist) in your /home/David542
directory (with your own username, of course).
Caveat: depending on your system, you could be using a shell different from bash, so you'd have to create a different dot file (.kshrc
, .cshrc
, .shrc
, etc).
.bashrc
in your home directory
精彩评论