Comments

Mysql Moving /var/lib/mysql and Error: 121

The downside of a development server is … it’s for development.

It is  not always cost effective to have the exact same setup as you you have in your production environment …

Especially if you have a multi server setup.

So I find myself today moving /var/lib/mysql … being as the OS drive is very small, and pulling down a near 20GB database backup and then trying to rebuild the database on the same drive … well as you can imagine caused a few problems doh

/etc/init.d/mysql stop
mv /var/lib/mysql /raid_5/

So surely you just symlink … right?

ln -s /raid_5/mysql /var/lib/mysql
/etc/init.d/mysql start

Well then answer would be no … upon importing the backup

mysql < backup.sql
Can't create table './database/table.frm' (errno: 121)

A nice errorno: 121

/etc/init.d/mysql stop
rm -rf /var/lib/mysql
mkdir /var/lib/mysql
chown mysql:mysql /var/lib/mysql
mount --bind /raid_5/mysql /var/lib/mysql
/etc/init.d/mysql start

et voila …

Data directory is relocated and the import working smoothly. Feel free to suggest any “cleaner” methods.

UPDATE: Please rememeber to add the ‘mount’ line into your rc.local otherwise when you reboot this mount will be gone!

Comments

Quickly Get the MAC Address of a Device on Your Network Using ARP

This is something I find myself having to do, more and more lately due to this VoIP roll out.

From windows (xp)

Start > run > cmd

Once the command window is open ping the IP address of the device (this forces your system to do an ARP request and store the device information in the cache, don’t ask me why but microsoft decided it was a good idea not to lookup the information if it isn’t allready in the cache!)

NOTE: Even if the device blocks ICMP, this should still work, run ettercap on your windows network to see just how many times you will see an ARP request along the lines of “WHO HAS xxx.xxx.xxx.xxx”.

Now to get the MAC address type

arp -a xxx.xxx.xxx.xxx

Where xxx.xxx.xxx.xxx is the IP address of the device you just pinged.

C:\Documents and Settings\buzz>arp  -a 10.99.1.10

Interface: XXX.XXX.XXX.XXX --- 0x3
  Internet Address      Physical Address      Type
  XXX.XXX.XXX.XXX            AA-BB-CC-DD-EE-FF     dynamic

Please note this only works for a device on the same IP range.

If you run two ranges, i.e.

192.168.1.XXX

and

192.168.2.XXX

You will need to make the ARP request from a device bound to that range (servers are especially usefull here).

n95
Comments

N95 Bittorrent

Well I’ll be damned, someone has actually done it!

https://www.aut.bme.hu/portal/SymTorrent.aspx?lang=en

A fully featured bittorrent client for your s60 mobile!

I am giving this a go on my N95 8GB now!

UPDATE: This works well by the looks of things.

DISCLAIMER: I AM USING WIFI FOR TORRENTS, DO NOT USE YOUR GPRS / 3G / EDGE DATA SERVICE FOR TORRENTS UNLESS YOU WANT A HUGE BILL!

n95
Comments

N95 Mail for Exchange

The page here: https://blog.totalcomputing.co.uk/2007/06/installing-mail-for-exchange-on-nokia.html

Describes how to get mail for exchange ( a nokia app) running on the N95

First install 1.3.1 and enter all your settings, and do a full sync.

Now update to 1.5.0, the reason for this is that once 1.5.0 is installed non of the settings can be changed.

I am yet to give this a go on my N95 8GB, but will post an update once I have.

UPDATE: Download version 2.5.5 here

Comments

Telnet - SMTP

To test a POP3 connection using telnet open a command window or shell terminal and type the following

telnet smtp.domain.com 25

Where smtp.domain.com is the FQDN (Fully Qualified Domain Name) or IP address of the server you wish to test.

25 also assumes default SMTP configuration.

You will be greeted with something similar to:

Escape character is '^]'.
220 smtp.domain.com

Now you need to enter the HELO command, followed by an idenfication of the server you ar esending from.

HELO buzz.domain.com
250 smtp.domain.com

Anything other than “250” indicates a problem.

You can now proceed with the test email transaction.

MAIL FROM: [email protected]
250 Ok
RCPT TO: [email protected]
250 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
This is where the data goes, you finish the input by placeing a dot (.) on a single line.


.
250 Ok: queued as D9FA03705C9
QUIT
221 Bye
Connection closed by foreign host.