Eduardo Sanz Garcia wrote:
Matthew Gardner wrote:
So, I was trying to run mysql on my computer at home to do some rails
stuff (just playing around, and moving a CS 360 project to my computer
so I could see it at home - I'm running OSX 10.5, if that's important),
and it works fine, but to start the daemon the installation is requiring
that I be in the directory with the mysql bin/ folder. I thought that
was kind of annoying, so I decided to make an alias in my .bashrc to
change directories, start the process, then change back. Probably an
easier way to do it would be to put in the alias all of the options that
make it so I don't have to do the change directories business, but I'm
not sure what all of those options are. Anyway, this was the alias that
I put in .bashrc:
alias 'mysql-start'='cd ~/Documents/mysql-5.0.51b-osx10.5-x86;
bin/mysqld_safe --defaults-file=my.cnf &; cd ~-'
Try
alias 'mysql-start'='cd ~/Documents/mysql-5.0.51b-osx10.5-x86;
bin/mysqld_safe --defaults-file=my.cnf & cd ~-'
I don't see very cleary the symbol after cd but I believe that should
be "cd -" not "cd ~-" if you want to return to your previous directory.
It should start the process in the background and change directory.
Don't put the "&" and the ";" together. Just one or the other.
You could even put the job in the background and disown it, then change
the directory:
bin/mysqld_safe --defaults-file=my.cnf & disown; cd ...
--------------------
BYU Unix Users Group
http://uug.byu.edu/
The opinions expressed in this message are the responsibility of their
author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
___________________________________________________________________
List Info: http://uug.byu.edu/mailman/listinfo/uug-list
--------------------
BYU Unix Users Group
http://uug.byu.edu/
The opinions expressed in this message are the responsibility of their
author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
___________________________________________________________________
List Info: http://uug.byu.edu/mailman/listinfo/uug-list