Hey all
Nobody probably uses mysql herebut I'l post it anyway. Just a tiny script to start a mysql database at localhost on port 3306. I'm going to use it eventually in my uprated airsnarf script.
I hope to add to airsnarf a few extra options like add WEP & WPA and a option to bind two cards so users can actualy connect to the netAlso hope to add things like mysql so you can be abit more advanced with the htdocs side of things.
I am still a baby when it comes to this sort of thing, I have taught myself php and a little perl for my last job on the side. But I did rob a script here and modify it so if you wana bitch slap me I deserve it.
Would anybody be intrested in this sort of thing? Or does somthing like this already exist and I'm wasting my time?
Just paste the above into kwrite, save it to root as somthing like mysqlstarter and chmod it to 755.Code:#!/bin/sh # #### Backtrack 2 Mysql Startup Script by Dr_Gr33n #### # option=6 echo "Welcome do the Dr_Gr33n's Backtrack 2 Mysql Startup Script" # echo "1) Start Small Server" echo "2) Start Medium Server" echo "3) Start Huge Server" echo "4) Check Mysql is running" echo "5) Stoping Mysql" echo "0) Exit" read option case $option in 1) echo "Starting Small Server" cp /etc/my-small.cnf /etc/my.cnf chown -R root . chown -R mysql /var chown -R mysql /var/lib/mysql /usr/bin/mysql_install_db --user=root /usr/bin/mysqld_safe --user=root & su mysql;; 2) echo "Starting Medium Server" cp /etc/my-medium.cnf /etc/my.cnf chown -R root . chown -R mysql /var chown -R mysql /var/lib/mysql /usr/bin/mysql_install_db --user=root /usr/bin/mysqld_safe --user=root & su mysql;; 3) echo "Starting Large Server" cp /etc/my-huge.cnf /etc/my.cnf chown -R root . chown -R mysql /var chown -R mysql /var/lib/mysql /usr/bin/mysql_install_db --user=root /usr/bin/mysqld_safe --user=root & su mysql;; 4) echo "Checking Mysql is running" /usr/bin/mysqladmin -u root -p version cd /root;; 5) echo "Stoping Mysql Server" /usr/share/mysql/mysql.server stop cd /root;; 0) echo "*** Bye ***" ;; *) exit &;; esac
Then just type run it from shell EG:
bt ~ # mysqlstarter
If I have done anything wrong, let me know.
have fun![]()




