Changing hostname and IP after setup

Hostname refuses to change after setup

Sometimes, i have very interesting circumstances whereby during a setup of a Mac cluster, i find that the hostname of the management node needs to be changed. However, after changing the computer name and the sharing name, the hostname command continues to provide the old hostname which is then wrong.

The below methods will then do the trick.

  • To change only the host name
    changeip - current-ip-address current-ip-address current-host-name new-host-name
    /System/Library/ServerSetup/serversetup -setComputername new-host-name
    /System/Library/ServerSetup/serversetup -setBonjourname new-host-name
    reboot
  • To change only the IP address
    changeip - current-ip-address new-ip-address
    /System/Library/ServerSetup/serversetup -setInfo en0 new-ip-address new-netmask new-router 
    reboot
  • Both
    changeip - current-ip-address new-ip-address current-host-name new-host-name
    /System/Library/ServerSetup/serversetup -setComputername new-host-name
    /System/Library/ServerSetup/serversetup -setBonjourname new-host-name
    /System/Library/ServerSetup/serversetup -setInfo en0 new-ip-address new-netmask new-router
    reboot

MySQL Notes

Extending mySQL 4GB table limits to 4.2 billion rows

mySQL is a powerful free database that is pretty widely used in web development. However, as data begins to grow, the most common question i get for mySQL is

  • What are the limits of the mySQL database?

If one is to look around the internet, there are many discussions on the 4GB limit on the table size of mySQL. That very very true. But is that the maximum a mySQL database can do? Recently, i was asked this question. After abit of surfing. i came across this site http://jeremy.zawodny.com/blog/archives/000796.html that mentions a way to beat this 4GB limit. Apprently, you should be able to get mySQL to push up to 4.2BILLON rows. That’s right. BILLION. And that should be way above the 4GB limit, and i am going to try it out.

Continue reading MySQL Notes