Yay.. I now have a phone system : www.3cx.com
My development network is coming on nicely.
for those that are interested my network now looks like
ServerName – OS – Role(s)
DC1 – 2008 (DNS,ADS,DHCP)
Phone – 2008 (3cx)
Email – 2008 (Exchange 2007 all roles)
Computer-XP – XP – (Virtual box that will be receiving the polices from PolicyPak)
Computer-W7 – Windows 7/Gentoo – (My workstation)
To be added
Deployment – 2008 (WDS, WPKG)
SCOM -2008 (Microsoft System Center : Operations Manager)
Webserver – Gentoo Linux (Development sites, other linux stuff like mysql etc)
In other news.. I have decided to do a Joomy install on the main site, as my dreamweaver skills are not up to scratch for a super looking site.
Time to try to get Exchange 2007 talking to 3CX so I can do unified messaging…
When installing this blog, i wanted to clean all tables from a mysql database.. so I tried what I thought would be the obvious command
drop table %;
Nope..
Tried
drop table *;
Nope..
So i turn to my friend google and find this bit of wonderful code..
you can run it like this ./drop_all_tables “dbuser” “dbpass” “dbname”
#!/bin/bash
MUSER="$1"
MPASS="$2"
MDB="$3"
# Detect paths
MYSQL=$(which mysql)
AWK=$(which awk)
GREP=$(which grep)
if [ $# -ne 3 ]
then
echo "Usage: $0 {MySQL-User-Name} {MySQL-User-Password} {MySQL-Database-Name}"
echo "Drops all tables from a MySQL"
exit 1
fi
TABLES=$($MYSQL -u $MUSER -p$MPASS $MDB -e 'show tables' | $AWK '{ print $1}' | $GREP -v '^Tables' )
for t in $TABLES
do
echo "Deleting $t table from $MDB database..."
$MYSQL -u $MUSER -p$MPASS $MDB -e "drop table $t"
done