While playing with my /etc/hosts file for testing a new server setup I needed to flush my DNS cache. As ever, terminal came to my aid.
dscacheutil -flushcache
Now all is well in the world of DNS.
While playing with my /etc/hosts file for testing a new server setup I needed to flush my DNS cache. As ever, terminal came to my aid.
Now all is well in the world of DNS.
The last couple of days I’ve been thinking about setting up a local copy of my websites on my laptop so that I can develop them before I make them live.
Last night I enabled PHP on the apache server built into Mac OSX on my new laptop and installed MySQL on it. I also set up some bash aliases to rsync commands so that I could synchronise the websites from the server to the laptop and back again.
Now that I had local copies of the sites that are synchronised it was time to turn my attention to synchronising the databases between the server and my local machine. I could of configured the server’s MySQL installation to allow remote connections, however, I did not want to do this for security reasons. I decided that I would connect to the MySQL server over SSH by forwarding a port on my local machine to a remote port on the server.
First I needed to create an SSH tunnel using the following command
ssh -fNg -L 3307:127.0.0.1:3306 server.host.name Read the rest of this entry »
If you have never set a root password for MySQL, the server does not require a password at all for connecting as root.
To setup root password for first time, use mysqladmin command at shell prompt as follows:
$ mysqladmin -u root password NEWPASSWORD
However, if you want to change (or update) a root password, then you need to use following command
$ mysqladmin -u root -p’oldpassword’ password newpass
At the beginning of the week I purchased a new MacBook Pro In between working I’m in the process of configuring it as I like it and one of the things that was bugging me was the default shell for the root user. I was foolishly trying to set the the prompt PS1 value in .bash_profile when the default root shell isn’t even bash.
The solution is to switch to the superuser (root) and issue the following command…
chsh -s /bin/bash
That will change the default shell to bash and the prompt will change as per your configuration.
Just for information my root PS1 is…
PS1=’\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] ‘
Happy Configuring!
Recently I’ve had a bother with the Mac firewall asking me if I want it to accept incomming network connections every time I open a particular application.
The appropriate setting can be found under:
System Preferences : Personal > Security > Firewall
I have mine configured to “Set access for specific services and applications” which normally asks me if I want to allow an application to accept incoming connections the first time I run it and that’s normally the end of it. The trouble comes when you try and update certain applications using Software Update. I’m not exactly sure what causes the problem but for some reason with specific applications the firewall then proceeds to ask you, each time, if you would like it to accept incoming network connections. This you can imagine is superlatively tedious.
The answer though is to just delete the application from you applications folder and reinstall it. The first time you open the freshly installed application it will ask the question and then bug you no more. Then all you have to worry about is not updating it via software update again.
To Test POP3
telnet xxx.xxx.xxx.xxx 110 (xxx = mailserver)
+OK Hello there.
user USERNAME
+OK Password required.
pass PASSWORD
+OK logged in.
stat
+OK (Information about your mail)
quit
+OK Bye-bye.

Only a breach of criminal law may lead to prosecution. Breach of civil law, however, could well lead to the defendant being sued.
As trespass is a civil offence and not a criminal one then trespassers will most certainly not be prosecuted.
This post is attributed to my brother whom provided the information in the same conversation he tricked me into mis-answering a QI like question. More on that story later.

If you’ve ever used the great GNU Image Manipulation Program, GIMP, on a Mac then you’ll no doubt have been frustrated with the way X11 seems to handle window focus. Fortunately there is a solution and its just a couple of simple terminal commands away…
When selecting tools from their dialog in GIMP on your Mac then you are required to click once to give that window focus and again to actually select the tool you require. The same two clicks are required again to actually use your tool. You can either imagine or know first hand how annoying this becomes and its a shame for such a great piece of software to be blighted by this issue so lets fix it.
Firstly you’ll want to open your terminal (who could live without it… mine’s almost always open!). Then you want to enter either of the following commands depending on whether you’ve got XQuartz updates (and if you’re not sure just do both sets).
Recent Comments