Skip to content

How do I completely remove mysql-server on Debian?

I wish I had found this link a few minutes ago, so I will not spend too much time looking for the answer. It would be very useful if I rewrite what I consider really helping me here.

I figured I’d share my question here and then answer, as there seems to be many people stuck in my position – but no definitive answer. The problem is, if you apt-get remove mysql-server, it does not clean up the configuration and database files, so if you’ve somehow screwed them up, then installing again, will not replace them. So there seems to be many people asking “how do I completely remove mysql-server, so that I can re-install a fresh?” — everyone answers with apt-get remove --purge mysql-server — I’m not sure why, but this does not fully uninstall. My answer follows…

1. Try this (it’s also exactly what I did and it worked)
This worked for me (I’d also tried installing v5.0, but this made matters worse):

apt-get remove --purge mysql-server-5.0 mysql-common mysql-client-5.0
apt-get install mysql-server

I think the key here is removing mysql-common.

2. or Try this
removing mysql-server does not work because mysql-server is just a metapackage that depends on the specific server version

apt-get remove --purge 'mysql-.*'

or

apt-get remove --purge 'mysql-server.*'

will do the trick

Membuat Aplikasi Chat di Ubuntu Menggunakan node.js

Berikut ini kita akan membuat aplikasi chat yang sama seperti di http://chat.nodejs.org/

1. Install node.js
referensi: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

2. Download source code dan extract sebagai folder node_chat. Di terminal, cd ke node_chat kemudian

node server.js

3. Lihat hasilnya di browser http://localhost:8001 kemudian buat tab baru di browser dan buka http://localhost:8001, silakan chatting sendirian! Untuk sesama LAN bisa buka http://IP_YANG_MENJALANKAN_NODE_SERVER:8001 jadi bisa ngobrol bareng

Catatan: node.js tidak hanya bisa diinstall di ubuntu lihat http://nodejs.org/ katanya begini “Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.” Silakan terjemahkan sendiri, menurut saya artinya secara sederhana adalah node.js bisa digunakan untuk membuat aplikasi realtime.

My First Badge on Design Contest

I just want to show you that I’ve just been pass as accredited designers, horayy! It’s just for the beginning

I’ve been designing for years, and that was years ago. I like a little kid who got scout badge. But I am proud because it’s so easy to get this badge, while you try to hopefully easier too as I get it.

Download Flash Youtube di Ubuntu 11.04 Natty via Terminal

Untuk mendownload video di Youtube caranya sebagai berikut, setelah menyelesaikan satu file video di youtube ketik di terminal

$ lsof | grep Flash
plugin-co 2541      coder   17u      REG        8,1 26255209     138207 /tmp/FlashXXIZYWwm (deleted)

Perhatikan, hasilnya adalah /tmp/FlashXXIZYWwm (deleted), jadi seolah-olah file tersebut telah di delete padahal belum. Sekarang perhatikan kolom kedua yaitu bertuliskan 2541, dan kolom ke empat yaitu 17, jika kedua kolom ini berbeda silakan sesuaikan sehingga perintah di teminal untuk mendownload file di youtube adalah sebagai berikut

$ cat /proc/2541/fd/17 > lagu_keren_dari_youtube

mudah-mudahn membantu๐Ÿ˜€

“invalid command \N” Restore dump data PostgreSQL

Setelah googling tentang “invalid command \N” yang didapat ketika akan merestore data dump NAMADATABASE dengan cara:

$ psql -U NAMAUSER NAMADATABASE < DUMP_DATABASE_FILE

solusinya adalah membuat template0 telebih dahulu (kalau NAMADATABASE ada di drop dulu), dan cara berikut ini memecahkan masalah di “invalid command \N”

$ createdb -h NAMAHOST -U NAMAUSER -T template0 NAMADATABASE
$ psql -U NAMAUSER NAMADATABASE < DUMP_DATABASE_FILE

semoga bermanfaat๐Ÿ™‚