This is very useful to use with GPSdrive.
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![]()
This is very useful to use with GPSdrive.
"\x74\x68\x65\x70\x72\x65\x7a\x39\x38";
Glad to hear somebody found this usefull![]()
Excellent script Doc.
For option 5 I'm pretty sure you want "Stopping" not "Stoping" which is a geologic process to do with magma![]()
I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.
I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.
lol you learn something new everyday![]()
Nicely done docscripts are fascinating.
[FONT=Courier New][SIZE=2][FONT=Courier New]hehe...
[/FONT][/SIZE][/FONT]
I tried the script. It worked for me, but I cant access the mysql root acc.
I got this error:
bt ~ # /usr/bin/mysqladmin -u root password testpass
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
I used my root login password & default root's password "toor", but no luck.
-appreciate any help ;-)
the password is nothing, just hit enter![]()