mysql server – how to reduce disk space by moving mysql-bin.00000

mysql-logo

One fine day, the server disk usage report that, the one of the partitions is almost full. After some searching, the database directory at /var/db/mysql/ (FreeBSD) or /var/lib/mysql/ (Linux) is occupying most disk space. Listing the directory only to found out that mysql-bin.0000* are the ones that is occupying the disk space. What are these files? Can it be remove it to reduce disk usage?

These mysql-bin.0000* files are the binary logs for your database. It contains all the statements of updating your database. It another words, it is the archived of your database. Removing it will need some preparations, which is not covered in this post. But the below does suggest a way to move it to another partition or disk :

Read More »

ubuntu – video player reported error reading media upon encrypted DVD

ubuntu-logo


After inserting an DVD and started playing, vlc complain that it was unable to read the media. Totem & Kmplayer have the similar error message as well. Playing the same dvd on MAC or dvd player with TV was fine.

No helpful messages was shown in the previous players on Ubuntu. Lastly, mplayer (command line based player) was used to troubleshoot the problem as it runs in the console and would output any error, plainly. It turns out that dvd was a encrypted dvd. Which need additional packages for it to run properly :



Read More »

vim – case insensitive search and occurrence or match operations

vim-logo


A short tip. For searching in vim, enter the “Command-line” mode by type a colon (“:”) in “Normal” mode (Esc twice at any time) and type “set ignorecase” for case-insensitive search.


e.g.

:set ignorecase


Additionally, for “nextoccurrence or match, type “n” or “N” for “previousoccurred match.


Ciao !!!

FreeBSD networking – IP address automatically assign aka DHCP

isc-logo


This is another follow up post on DHCP aka Dynamic Host Configuration Protocol, which posted first in here and then here. FreeBSD are commonly used as a server. One might ask why does it needs to auto assign IP using DHCP ? Should not it running static IP so that the server are contacted by the host always on that particular IP? To answer the question, the server could be in testing mode so any IP will do. Or the DHCP server have statically map the server’s MAC address to a particular IP in its table or pool. The DHCP server will only assign that particular IP to that MAC address when the DHCP client (which in this case is the FreeBSD server) sends out a broadcast requesting info to setup the IP assignment.


In short, just follow the below and IP will be assigned, if there is any DHCP server already configure within the network :



Read More »

vim – basics of search and replace in substitute command mode

vim-logo


When cleaning up some config file with hundreds of lines, browsing up and down just to find the key word can be eye dazzling, in the pungent way. :)

The good thing about vim is, it is able to find any text you want using the “Search” command (/) in the “Normal” mode (Esc twice any time).

Some of the time, we need to change the search result with a new value. Be it slight change, addition or even removal, vim is definitely up to the job. To quote a few examples :



Read More »

bash – how to print or display a new line or tab other then using echo

gnu-logo


Printing variables or text within bash script is good for debugging. It can trace which line or variables is having problem. echo is the commonly is used for such debugging purpose. But some times we need it to print tabs, new line & other escape strings in a one liner bash. One way to do it is using printf :



Read More »

ubuntu – firefox cannot resolve URL with telnet:// protocol

ubuntu-logo firefox-logo


In Firefox, when clicking on a URL link with “telnet://“, firefox browser would pop up an error message “Firefox doesn’t know how to open this address, because the protocol (telnet) isn’t associated with any program.“. It is due to the browser have not register a helper application to run the URL link with “telnet://“. Below are some simple steps to prepare firefox in Ubuntu using xterm to open the URL :



Read More »

Debian – apt-get and apt-cache common operation or usage

debian-logo


Initially there was tar.gz. Packages are distributed through compressed archive. Users will have to de-compress themself then compile it, finally, install it. The famous “configure; make; make install” 3 step. If the installation break the halfway, due to library dependencies, users will have to figure a way to fulfill it. Cross your finger, no more breaks happen after fulfilling the dependencies. Talking about nightmares.

After a while later, Debian come out with a way to manage all these “nightmares”. A package system that manages its library dependencies, Advanced Packaging Tools. Since then, installing packages on linux have never been so easy. It not only make installation of packages a fun, but also made patching hassle free. Below are the commonly used operation on apt :



Read More »

cisco IP phone – 7912 series, access the configuration mode

cisco-logo


A note for myself on cisco IP phone, 7912 series. To access its configuration mode, goto :



Read More »

Linux networking – edit /etc/network/interfaces for fixed IP assigment

debian-logo ubuntu-logo


This is a follow up of the previous post, which demonstrate how to configure NIC (Network Interface Card) to obtain IP address automatically using DHCP client. This post, however, attempt to demonstrate how to assign fixed IP assignment onto NIC, using CLI (Command Line Interface). The below is the instructions :



Read More »

Please sponsor my coffee if you find my posts worth reading, thanks!


-->
Improve the web with Nofollow Reciprocity.