February 9, 2010 at 20:20
· Tags: Debian, howto, Linux, MySQL, password, reset, Ubuntu
The following procedure can be used to reset the password for any MySQL root accounts on Linux and Unix (*nix). The instructions assume that you have got the proper permissions on the host system.
Stop the MySQL daemon process
sudo /etc/init.d/mysql stop
Create a text file /home/me/mysql.sql and place the following statements in it. Replace the password with the password that you want to use
UPDATE mysql.user SET Password=PASSWORD('a_new_password') WHERE User='root';
FLUSH PRIVILEGES;
The UPDATE and FLUSH statements each must be written on a single line. The UPDATE statement resets the password for all existing root accounts, and the FLUSH statement tells the server to reload the grant tables into memory.
Start the MySQL server with the special –init-file option
mysqld_safe --init-file=/home/me/mysql.sql
Press Ctrl+C and then start the MySQL server again by /etc/init.d/mysql start and you are done.
Related posts:
- Howto Recover a Linux Root Password
- Executing SQL Statements from a Text File
- How to hack Windows password with Ophcrack
- Crack Windows Password
- Optimize MySQL Performance With MySQLTuner
- Optimize MySQL for Low Memory Use
- How to reset a Nokia
- MySQL Optimization and Performance Tips
- How to do MySQL replication (dual-master / multi-master)
- Howto: Resize Xen Loop Disk Image
Permalink
January 9, 2010 at 12:50
· Tags: cisco, Crack, FTP, hack, HTTP Auth, ICQ, IMAP, LDAP, MySQL, network drive, network share, NNTP, password, PCNFS, POP3, Samba, smb, Socks5, telnet, VNC, windows network
THC-Hydra – the best parallized login hacker: for Samba, FTP, POP3, IMAP, Telnet, HTTP Auth, LDAP, NNTP, MySQL, VNC, ICQ, Socks5, PCNFS, Cisco and more.
Download THC-Hydra, extract and compile
wget http://freeworld.thc.org/releases/hydra-5.4-src.tar.gz
tar zxvf hydra-5.4-src.tar.gz
cd hydra-5.4-src
./configure --disable-xhydra --prefix=~/bin
make
make install
Hydra v5.4 [http://www.thc.org] (c) 2009 by van Hauser / THC
Syntax: hydra [[[-l LOGIN|-L FILE] [-p PASS|-P FILE]] | [-C FILE]] [-e ns]
[-o FILE] [-t TASKS] [-M FILE [-T TASKS]] [-w TIME] [-f] [-s PORT] [-S] [-vV]
server service [OPT]
Options:
-R restore a previous aborted/crashed session
-S connect via SSL
-s PORT if the service is on a different default port, define it here
-l LOGIN or -L FILE login with LOGIN name, or load several logins from FILE
-p PASS or -P FILE try password PASS, or load several passwords from FILE
-e ns additional checks, "n" for null password, "s" try login as pass
-C FILE colon seperated "login:pass" format, instead of -L/-P options
-M FILE server list for parallel attacks, -T TASKS sets max tasks per host
-o FILE write found login/password pairs to FILE instead of stdout
-f exit after the first found login/password pair (per host if -M)
-t TASKS run TASKS number of connects in parallel (default: 16)
-w TIME defines the max wait time in seconds for responses (default: 30)
-v / -V verbose mode / show login+pass combination for each attempt
server the target server (use either this OR the -M option)
service the service to crack. Supported protocols: [telnet ftp pop3 imap smb
smbnt http https http-proxy cisco cisco-enable ldap mssql mysql nntp vnc rexec
socks5 snmp cvs icq pcnfs sapr3 ssh2 smtp-auth]
OPT some service modules need special input (see README!)
Use HYDRA_PROXY_HTTP/HYDRA_PROXY_CONNECT and HYDRA_PROXY_AUTH env for a proxy.
Hydra is a tool to guess/crack valid login/password pairs - use allowed only for
legal purposes! If used commercially, name and web address must be mentioned in
the report. You can always find the newest version at http://www.thc.org
Related posts:
- Crack or Recover Password Protected Excel Spreadsheet
- HackerGuide: Crack Password Encrypted Zip-files
- Howto: How to Reset the MySQL Root Password
- Crack zip password with fcrackzip
- Crack or Recover Read-only Password Protected Word Document
- How to hack Windows password with Ophcrack
- Crack mdb Password
- Recover (Crack) a password from a Microsoft Access Database (mdb)
- Howto Crack Rar, 7z, and zip files in Linux
- Crack Cisco VPN (hack)
Permalink
February 15, 2009 at 21:12
· Tags: MySQL, sql
From time to time it is useful to be able to append a string or data to an existing data of a data field by using concat function in MySQL.
For example we want to add site signature at the end of the comments posted by users.
concat(field_name,”string to add”)
Now let us see how it is used in a MySQL table query.
update comments set field_name=concat(field_name,’string to add’) where id=’1′;
Related posts:
- Mysql Data Import
- Optimize MySQL Performance With MySQLTuner
- Howto: How to Reset the MySQL Root Password
- MySQL Optimization and Performance Tips
- Simple RADIUS XML dump PHP script
- MySQL: Remove Duplicate Entries
- Slow Query Log Analyzes Tools
- MySQL search and replace
- MDB Tools to export (migrate) from mdb (Microsoft Access format) to MySQL
- Optimize MySQL for Low Memory Use
Permalink
January 31, 2009 at 21:22
· Tags: 7z, bzip2, gzip, Linux, lzma, MySQL, mysqldump
Do a mysql dump and compress directly with gzip
mysqldump < mysqldump options> | gzip > outputfile.sql.gz
Gunzip and import using gzip
gunzip < outputfile.sql.gz | mysql < mysql options>
Do a mysql dump and compress directly with bzip2
mysqldump < mysqldump options> | bzip2 > outputfile.sql.bz2
Bunzip2 and import using bzip2
bunzip2 < outputfile.sql.bz2 | mysql < mysql options>
Do a mysql dump and compress directly with lzma
mysqldump < mysqldump options> | lzma > outputfile.sql.lzma
Unlzma and import using unlzma
unlzma < outputfile.sql.lzma | mysql < mysql options>
Related posts:
- Optimize MySQL for Low Memory Use
- Howto: How to Reset the MySQL Root Password
- Optimize MySQL Performance With MySQLTuner
- Sun acquires MySQL
- MySQL Optimization and Performance Tips
- MDB Tools to export (migrate) from mdb (Microsoft Access format) to MySQL
- MySQL 5.0 Release Candidate
- MySQL Performance Monitoring and Optimization Tools
- MySQL Concatenate: Adding String At The End Of Field Data
- Howto Use URL Rewriting for PHP Web Applications
Permalink
October 9, 2008 at 19:32
· Tags: Debian, Linux, MySQL, optimization, performance, PHP
From time to time I’m doing some experiments on my server that is hosting this blog. Recently I found out that my blogging software used here, Wordpress, missed some indexes in the MySQL database.
This article from MySQL Performance Blog explains how to log slow queries and how to identify queries, which do not use indexes.
MySQL has simple but quite handy feature – slow query log, which allows you to log all queries which took over define number of seconds to execute. There is also an option to enable logging queries which do not use indexes even if they take less time (–log-queries-not-using-indexes)
Slow query log is great to spot really slow queries which are often good candidates for optimization but it has few serious problems which limits extent to which it is helpful. First – it only allows you to set slow query time in seconds, having 1 second minimum value. For most of interactive applications this is way too large – if you’re developing Web application you probably want whole page to be generated less in 1 second, which issues many queries during generation. Second – if you enable option to log queries which do not use indexes it well can be flooded with fast and efficient queries, which just happen to do full table scans – for example if you would be having drop down list of states in your application and use SELECT * FROM STATES for that it would trigger and log the query.
Related posts:
- Optimize MySQL Performance With MySQLTuner
- MySQL Performance Monitoring and Optimization Tools
- Troubleshooting PHP Sqlite Query Error: Unable to open database
- Windows Developers Begin Slow Defection to Linux
- Optimize MySQL for Low Memory Use
- MDB Tools to export (migrate) from mdb (Microsoft Access format) to MySQL
- Howto: How to Reset the MySQL Root Password
- Dell: Linux Rolls On
- MySQL Concatenate: Adding String At The End Of Field Data
- Linux Terminal Speed Performance Comparison
Permalink
July 30, 2008 at 14:02
· Tags: apache, forwarding, httpd, MySQL, PostgreSQL, SSH, virtualbox
Here are the commands used to open and forward the host’s port 2222 to the guest’s port 22 (SSH Server Port).
Type this into a terminal:
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP
Could also be used to forward PostgreSQL and HTTP:
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/postgresql/HostPort" 5432
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/postgresql/GuestPort" 5432
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/postgresql/Protocol" TCP
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/HostPort" 8080
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/GuestPort" 80
VBoxManage setextradata nameofyourguest "VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/Protocol" TCP
Related posts:
- Howto Access via ssh a Virtualbox Guest machine
- Sockets Programming in Java
- Convert from VMWare To VirtualBox
- How to mount bin / cue image files in Linux
- MySQL Optimization and Performance Tips
- Gaming with Intel GMA 900, GMA 950, 915 or 945 GL/GV/GM Based Chipsets
Permalink
July 8, 2008 at 8:48
· Tags: apt-get, aptitude, backports, Debian, MySQL, packages
instructions [Debian Backports]
Using backports.org is very simple:
1. Add this line
deb http://www.backports.org/debian etch-backports main contrib non-free
to your /etc/apt/sources.list.
2. Run apt-get update
3. All backports are deactivated by default. If you want to install something from backports run:
apt-get -t etch-backports install “packageâ€
Of course, you can use aptitude as well:
aptitude -t etch-backports install “packageâ€
Related posts:
- Howto Install Sun Java on Debian Etch
- Upgrade Debian Etch to Debian Lenny
- Howto install Java on Debian Sarge
- Howto Install Oracle on Debian
- dos2unix on Ubuntu and Debian
- Ubuntu Howto: Install Oracle
- Howto: Install Ruby and Rails on Debian or Ubuntu
- Update entry on Xen on Debian Etch
- Installing Xen on Debian Etch 4.0
- Howto install Xen on Debian Sarge (stable)
Permalink