Software
MySQL tips
Submitted by phecht on Sun, 2010-08-29 16:09Here is how to create a MySQL database with out having to remember the syntax:
#!/bin/bash
EXPECTED_ARGS=3
E_BADARGS=65
MYSQL=`which mysql`
Q1="CREATE DATABASE IF NOT EXISTS $1;"
Q2="GRANT INSERT, SELECT, UPDATE, DELETE, CREATE, DROP, ALTER ON '$1'.* TO '$2'@'localhost' IDENTIFIED BY '$3';"
Q3="FLUSH PRIVILEGES;"
SQL="${Q1}${Q2}${Q3}"
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: $0 dbname dbuser dbpass"
exit $E_BADARGS
fi
$MYSQL -uroot -p -e "$SQL"
Just put that into a file, change the permissions and you should be able to create a user and database. You might have to change the "-uroot" if you are on a shared host.
Operating Systems
Submitted by phecht on Fri, 2007-11-23 20:26Most people still use Windows. A few use a Mac. Fewer still use Linux.
VMWare Fusion does not allow 10.5 OS X to be installed, OS X Server 10.5 can be virtualized.
http://www.vmware.com/support/fusion2/doc/releasenotes_fusion.html
http://asendure.wordpress.com/2006/10/01/osx86-how-to-install-mac-os-x-o... show how to get 10.4.6 installed.
