Thursday, September 24, 2009

Free news server (NNTP) access

Most UK ISPs have never heard of newsgroups. They think the internet == the web. Duh! So it is very difficult these days to find an NNTP server. This note is to remind me of which one I am using at the moment. Currently it is nntp.aioe.org. I will update this page as this changes over time.Free newsgroup servers do tend to get shutdown eventually (sigh).

Saturday, September 19, 2009

getting mySQL set up on ubuntu

It is too painful to setup mysql via a source code build so I used a non-RPM install. It didn't quite work out of the box. Here's what I did: groupadd mysql
useradd -g mysql mysql
cd /usr/local
gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
ln -s full-path-to-mysql-VERSION-OS mysql
cd mysql
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --force
chown -R root .
chown -R mysql data
bin/mysqld_safe --user=mysql &
This last step was an attempt to start up the mysql server. It failed, as can be seen by the next command and its output. bin/mysqladmin version
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
On with an attempt at a fix: touch /var/run/mysqld/mysqld.sock
chown -R mysql /var/run/mysqld/
bin/mysqld_safe --user=mysql &
THIS DIDN'T WORK. Error log said:
[ERROR] Can't find messagefile '/usr/share/english/errmsg.sys'
fixed by saying:
bin/mysqld_safe --user=mysql --language=./share/english &
Now I can connect. All I need to do now is put this into the bootup sequence....

Friday, September 11, 2009

How to rollback a changeset in subversion

Suppose you want to rollback the changes in changeset 2340. You checkout the HEAD into some working directory, then do the following:
svn merge -c -2340 .
svn ci -m
Then you will probably want to set up the working copy so it has the changes you rolled back so you can fix whatever was wrong. Here's the command you use:
svn merge -c -2340 .
This is not very obvious to the beginner. It is done using merge rather than revert. The svn revert command is used to revert uncommitted changes.