This is not meant to be used outside the context of the Catalyst MySQL Installation Workshop.
Highlight all of the text with your fancy, space-age mouse,
Copy (Control+C), and
In PuTTY, simply right-click
(note that Control+V does not paste in PuTTY).
Start the BaSH Shell
bash
Enable colors and “nice” paths on the command line:
wget http://uwwebpub.com/tools/bash_profile.sh \ && cat bash_profile.sh >> ~/.bash_profile \ && rm bash_profile.sh \ && source ~/.bash_profile
Set-up and run UWTechnology’s MySQL Binary:
wget http://uwwebpub.com/tools/{config,protect,cmds,install}.sh \ && chmod u+x ./{config,protect,cmds,install}.sh \ && ./install.sh
Starting Over
This is pretty drastic: you will lose any data you have in your databases! This will ask for your MySQL Password.
/usr/local/mysql/bin/mysqladmin -u root -p shutdown \ && rm ~/.my.cnf \ && rm -rf ~/mysql-data \ && rm -rf ~/mysql_install_logs \ && rm -rf ~/connect.php
Killing it
This is the most drastic: it stops MySQL dead in its tracks. This is almost guaranteed to corrupt your data (although it may not).
You should only use this if you’ve forgotten your MySQL password.
kill -9 `ps ux | grep mysql | cut -f2 -d' ' | egrep '[0-9]+'`
This is the very generalized procedure for installing database-driven webapps into a UW staff UA computer account.
Find the URL of the .tar.gz file you want to download. .zip files fine too.
Run
cd $HOME/public_html wget http://your-url.com/path/file-1.2.tar.gz
Run
tar zxf file-1.2.tar.gz
or
unzip file-1.2.zip
Create the symbolic link in the manner of
ln -s file-1.2 file
Navigate to http://yourwebsite.edu/username/file and follow the instructions.
Navigate to http://yourwebsite.edu/username/phpmyadmin to create a database if you need to.
(Also see the Unix Curriculum).
pwd prints the working directory
cat FILE shows the contents of FILE all at once
less FILE shows a file screen-by-screen (press q to exit.)
pico FILE opens the UW Pico basic text editor to edit (or create) FILE
(Control+O to save; Control+X to exit)
mkdir DIR creates a directory DIR inside the working directory.
mv OLD NEW moves (or renames) the file OLD to NEW
ln -s LONG SHORT creates a shortcut (symbolic link) to LONG at SHORT
cd DIR changes working directory to DIR
cd (without a DIR) changes working directory to home (a/k/a ~)
ls lists the contents of the current directory
rm -r F (recursively) delete the file (or folder) F
wget URL downloads the file at URL to the working directory
tar xzf FILE unzips a tar.gz or .tgz file called FILE
chmod 755 FILE makes FILE writable by the web server (and visible to
everyone else!)
/usr/local/mysql/bin/mysqladmin -u root -p shutdown stops your MySQL
server (this will ask for your MySQL password).
/usr/local/mysql/bin/mysqld_safe & starts your MySQL server if it’s
stopped
/usr/local/mysql/bin/mysql -u root -p allows you to interface directly
with the server (Control+D or Control+C to exit; Control+G if you
you’re stuck in the prompt)
/usr/local/mysql/bin/mysql -u root -p < FILE allows you to send the
contents of FILE directly to the MySQL server (some installation scripts
will give you an SQL file to run.)
cd; protect.sh public_html/DIR USER1 USER2 USER3 allows you to limit
access to DIR (within your public_html directory) to only users with
UWNetID USER1, USER2, etc.
Author: Ryan Timmons
Last Modified: 06 August 2008 15:23:13 PDT
URL: http://uwwebpub.com/