Once in a while it happens that I forget the root password of a MySQL server. Several methods are explained in details on the MySQL website.
Until now I’ve always used the –skip-grant-tables method, and I was surprised to see a new method using the –init-file option. I tried it, but it didn’t work for . . . → Read More: How to reset MySQL root password
If you need to add an additional swap space, but you don’t have an available partition for it, or you want the flexibility of changing the size later, you can use a file for your swap. Here is how to do it.
The first step, is to create the files to be of the size . . . → Read More: Using a file to add additional swap space
The command called hostname, allows to show and set the host name. The thing is, that setting the host name in this way is not persistent, and a reboot will revert to the original host name. . . . → Read More: Setting the hostname in Ubuntu Linux
Mounting disks by label instead of by device, can be a good idea, because it helps to decouple from the device where your disk get attached. This is especially important for USB drives, that could get attached to different locations, or in virtual environments.
Labels are given to partitions, not to disks, but In my . . . → Read More: Mounting disks by label and fstab format
I came across an interesting blog article explaining how to improve Eclipse appearance on Linux.
I tried the suggestion and I’m happy with the result. Thank you Daniel!
Unit testing is useful to test individual parts of the program, to check if they respect the specifications. Actually as any type of testing, can only point out bugs, but can’t prove that the program is correct.
Despite that, they are very useful during development, as TDD (Test Driven Development) suggests, it can be . . . → Read More: PHPUnit, Unit Testing with PHP
When using php setlocale() function it’s important to check the return value. I used to call it without checking it as in:
Without figuring out that if the locale it_IT.UTF-8 is not present in the system, the setlocale function fails and returns false.
The first idea I had to try to add the . . . → Read More: Configuring locales on Ubuntu
Today I’m installing a Webserver that has access to the internet restricted for security reasons. Since the base operative system is Ubuntu Linux, I’ve to tell apt-get to use a proxy.
To do this, I just have to add the following lines to /etc/bash.bashrc file :
export http_proxy=http://username:email@example.com:port/ export ftp_proxy=http://username:firstname.lastname@example.org/
Obviuosly customized with my username, . . . → Read More: Using apt-get behind a proxy
Getting my old repositories to work on a new server.
To do so on my Ubuntu based server I did the following:
# apt-get install cvs # groupadd cvs # useradd -g cvs -d /var/cvs cvs
Then I copied my repositories into /var/cvs and changed permissions:
# chown -R cvs.cvs /var/cvs # useradd -g cvs . . . → Read More: Installing CVS with existing repositories