Sunday, September 8, 2019

Hello :)

I wont pretend to know it all so although any info here worked for me, it may not work for you so buyer beware :)

Monday, January 18, 2010

Could not connect to mysql database

This can be a pretty annoying error message to come across, thankfully though it doesn't *always* mean the end of the database! when you look in the /var/log/.err log you will large chunks of data in the log file - it looks like gibberish and lots of square characters in putty and sometimes a message that the database is rolling back on itself. this loop, rollback -> fail -> rollback can occur indefinately and eats away at the ram and cpu on the system as well as creating large log files and sometimes excessive swapping!

first thing to do is start the database in recovery mode, that will stop the loop mentioned above and hopefully allow you to take a dump of your tables.

Find my.cnf - normally in /var/db/mysql/my.cnf and edit adding the following line:

innodb_force_recovery = 1

restart the database - at this stage a

mysql -u root -p ***** databaseName

will let you verify that you can connect again.

Then dump the tables - the command would look like this:

mysqdump -u root databaseName tablename1 tablename2 > /var/database.dump

Next move the inodb and ibdata files out of the way normally located in /var/db/mysql

and then the tables that you are backing up in /var/db/mysql/databaseName

After this we are now ready to remove or comment out

innodb_force_recovery

in my.cnf and restart mysql server.

Now import the dump taken earlier:
mysql -u root -p ***** databaseName < /var/database.dump

and if all goes to plan, you might just have saved your database!

the import process can sometimes take some time, iv seen up to 30 minutes with some large systems. If there is an issue with the import, the command will fail. This can mean that the dump that you have taken is corrupt :( or that MySql is running out of memory. This can be adjusted by configuring the MySql memory buffers:

innodb_buffer_pool_size

this is supposed to be set between 50 to 80% of your systems Ram. the highest I have set it to would be 400MB.


Wednesday, September 16, 2009

Login to multiple gmail talk accounts on the same machine

if you want to run multiple instances of googeltalk client, right click on the shortcut for gtalk and in the target box edit to add the following flag /nomutex

  • c:\program files\google\google talk\googletalk.exe /nomutex
and now u can sign into as many accounts as you like :)

quick and dirty hack to reclaim your process list

if like me you are sick of seemingly exponential growth of various application that run update services running on your PC, resulting in a process running when your not using the application here is a quick way to disable them permanently, using msconfig to disable startup items normal results in some of these apps re-enabling the update services..

This technique is also very effective against virus and spyware binaries.

navigate to the folder that contains the updater and create an emtpy file with the same name of the target process and append .manifest




Running that process will no result in the following error message being displayed on manual run

Tuesday, September 8, 2009

hello cormac

ar the rss feeds ok?

Blocking Adds on MSN



I found a few tutorials on the internet about this but for some reason didn't seem to work with the version available Sep 2009 (I cant find the about button to get the version!!). The other tutorials tell you what to add, but this should help you figure it out yourself so you can try it on future versions or for other clients.

The other tutorials all mention using the host file which I did, and here's what it looked like:

#
## block msn adds
#
127.0.0.1 rad.msn.com
127.0.0.1 global.msads.com
127.0.0.1 rss.video.msn.com
127.0.0.1 ads1.msn.com
127.0.0.1 rad.live.com
127.0.0.1 specials.uk.msn.com
127.0.0.1 config.messenger.msn.com
127.0.0.1 view.atdmt.com
127.0.0.1 edge1.catalog.video.msn.com
127.0.0.1 img4.catalog.video.msn.com
127.0.0.1 rad.msn.com.nsatc.net

But for some reason the adds were still getting through, so for the next step I downloaded a Trial of DNS server and installed the appliaction

http://www.jhsoft.com/

and configured my PC to use it's own IP as a DNS server in:
Ctrl Panel -> Network Connections -> WAN -> TCP options -> DNS server

Next quit all internet apps like gmail, firefox , skype, torrents, network apps etc to reduce the amount of DNS traffic eminating from the PC

Start a Command Prompt:

Start -> Run -> cmd

and issue the command:

ipconfig /flushdns

to clear the current DNS cache.

Start MSN Client and after you see the adds pop up look at the DNS cache snapshot in Simple DNS Plus and block, either in your host file:

c:/Windows/system322/drivers/etc/hosts

or by adding to the restricted Sites on your router (In my case a basic Netgear has a site filter capability).

127.0.0.1 ads2.msn.com.c.footprint.net
127.0.0.1 rad.msn.com.nsatc.net
127.0.0.1 .doubleclick.net

Clear the DNS cache on Simple DNS Plus, clear the windows cache as before and relaunch MSN client and you'll notice the advertising pane replaced with the image at the top of this post!