Set / Change / Reset the MySQL root password on Ubuntu Linux

Sabtu, 11 Agustus 2012

Tested on
- Ubuntu Linux 7.10 Gutsy Gibbon and MySQL 5.0.45. (2007-10-21)
- Ubuntu Linux 6.06 Dapper Drake and MySQL 4.1.15.

Set / change / reset the MySQL root password on Ubuntu Linux. Enter the following lines in your terminal.

  1. Stop the MySQL Server.
    sudo /etc/init.d/mysql stop

  2. Start the mysqld configuration.
    sudo mysqld --skip-grant-tables &

  3. Login to MySQL as root.
    mysql -u root mysql

  4. Replace YOURNEWPASSWORD with your new password!
    UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;
Note: This method is not regarded as the securest way of resetting the password. However it works.


References

MySQL 5.0 Reference Manual: How to Reset the Root Password

How to reset your password in Ubuntu


There are many reasons you might want to reset a password:
Someone gave you a computer with Ubuntu installed on it but not the password for the user account.
You just installed Ubuntu and forgot what password you selected during the installation process.
You have too many passwords in your life and can't keep track of them all.
Well, this tutorial will help you reset your Ubuntu user account password, regardless of what reason you have for resetting it.
First, you have to reboot into recovery mode.
If you have a single-boot (Ubuntu is the only operating system on your computer), to get the boot menu to show, you have to hold down the Shift key during bootup.
If you have a dual-boot (Ubuntu is installed next to Windows, another Linux operating system, or Mac OS X; and you choose at boot time which operating system to boot into), the boot menu should appear without the need to hold down the Shift key.

From the boot menu, select recovery mode, which is usually the second boot option.

After you select recovery mode and wait for all the boot-up processes to finish, you'll be presented with a few options. In this case, you want the Drop to root shell prompt option so press the Down arrow to get to that option, and then press Enter to select it.

The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it), so please be careful with what commands you enter in the root terminal.

In recent versions of Ubuntu, the filesystem is mounted as read-only, so you need to enter the follow command to get it to remount as read-write, which will allow you to make changes:

mount -o rw,remount /

If you have forgotten your username as well, type

ls /home
That's a lowercase L, by the way, not a capital i, in ls. You should then see a list of the users on your Ubuntu installation. In this case, I'm going to reset Susan Brownmiller's password.
To reset the password, type

passwd username
where username is the username you want to reset. In this case, I want to reset Susan's password, so I type
passwd susan
You'll then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Your password is still being accepted. Just type the password and hit Enter when you're done. You'll be prompted to retype the password. Do so and hit Enter again.

Now the password should be reset. Type

exit
to return to the recovery menu.
 
After you get back to the recovery menu, select resume normal boot, and use Ubuntu as you normally would—only this time, you actually know the password!

Note:
Some people get freaked out about having recovery mode logging you in as root.

INSTALL OpenSSL DAN MEMBUAT SSLCertificate UNTUK MENGAKTIFKAN HTTPS DI APACHE2

Selasa, 07 Agustus 2012

Berikut tutorial dari Bang Opick Opensource Telkomspeedy :

Silahkan Di unduh di link berikut :  Tutorial openssl dan sslcertificate untuk https

Uninstall Apache dengan tuntas....

Terkadang kita membuat konfigurasi web server jadi komplek dan rumit, atau tidak sengaja tiba-tiba membuat setting yang mengakibatkan apache tidak berjalan normal. Untuk mengembalikan apache ikuti langkah uninstall dan install berikut ini.
Jalankan perintah :
        sudo apt-get --purge remove apache2.2-common

Perintah ini akan menghilangkan beberapa paket yang berhubungan :
apache2* apache2-mpm-prefork* apache2.2-common* libapache2-mod-php5* php5*

Dan Install lagi apache yang baru agar kembali ke setting awal :
         sudo apt-get install apache2 apache2-mpm-prefork apache2.2-common libapache2-mod-php5 php5

Web server bisa berjalan normal lagi.