Thursday, February 23, 2012

Change MySQL root Password


By default, MySQL is installed with root user without password. Do you want to change MySQL root password under Linux, FreeBSD, OpenBSD and UNIX like operating system over ssh / telnet session?

Setting up MySQL password is one of the essential tasks. Root user in MySQL is MySQL admin account user. Please note that the Linux / UNIX root account for your operating system and MySQL root are different. They are separate and nothing to do with each other. Sometime your may remove mysql root account and setup admin as mysql super user for security purpose.

Using mysqladmin command to change root password

If you have never set a root password for MySQL server, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:
$ mysqladmin -u root password NEWPASSWORD

However, if you want to change (or update) a root password, then you need to use the following command:
$ mysqladmin -u root -p'oldpassword' password newpass

Example:
If the old password is wayan, you can set the new password to kadek using the following command:
$ mysqladmin -u root -p'wayan' password 'kadek'
 

Change MySQL password for other users

To change a normal user password you need to type (let us assume you would like to change password for user komang) the following command:
$ mysqladmin -u komang -p oldpassword password newpass

Changing MySQL root user password using sql command (query syntax)

MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user komang:

1) Login to mysql server, type the following command at shell prompt: 
$ mysql -u root -p

2) Use mysql database (type command at mysql> prompt):
mysql> use mysql;
 
3) Change password for user komang, enter:
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='komang';
 
4) Finally, reload the privileges:
mysql> flush privileges;
mysql> quit

Thursday, November 17, 2011

Converting FAT32 to NTFS without losing data

Once upon a time you cannot copy a file into your portable hard drive, the system says 'No enough space in the disk'. But when you check the disk you still have plenty of space, so what's wrong?

Most of the time this is because the size of the file that you want to copy is too large for the file system to handle. Check your disk file system format, FAT32 can only handle about 4GB (232−1) bytes. Most portable hard drive and flashdisk is formated that way. So when you try to copy for example an ISO image of 7GB, the system will refuse to copy the file.

One way to resolve this issue is by converting the file system to NTFS format without losing all existing file in the disk. Just go to the Command Prompt and execute the command:

C:\> CONVERT  G:  /fs:ntfs

Where G: is a name of the drive you want to convert.

Note:
You may also have to check the disk for consistency before converting by executing:

C:\> CHKDSK  G:  /F

Friday, October 21, 2011

Installing Microsoft Games for Windows LIVE the easy way

More games are now require that Microsoft Games for Windows LIVE already installed. For example are DiRT racing series and Super Streer Fighter IV. Both are my favorite games. Actually I hate this requirement because I never playing game on online mode.

Straight to the point, first you must download 'Microsoft Games for Windows' installer. When you download it from Microsoft sites, it seems that the installer is small in size for the complete file packages would be downloaded later (about 70 MB) during installation process which will be a nightmare for those who have poor Internet connection. The solution is to download the complete package from other site. I myself download it from fileHippo, the link is here Microsoft Games for Windows.

You should also have Microsoft Visual C++ Redistributable and the latest Microsoft .NET framework installed on your system before installing Microsoft Games for Windows. Both installer can be downloaded there as well. Note that XP users should have Service Pack 3 installed and Windows7 users should have Service Pack 1 installed.

After installation of Microsoft Games for Windows, when you start the program, you will be prompted to install Windows Live ID sign-in Assistant. This is very annoying, anyway we have to download it from Microsoft Download Center, here is the link: http://www.microsoft.com/download/en/details.aspx?id=15106.
For 64bit system choose wllogin_64.msi and for 32bit system choose wllogin_32.msi

Bear in mind that before installing Windows Live ID sign-in Assistant, you must turn on Windows Update service (if it was turned off) otherwise your installation will fail. You can safely turn off Windows Update service later when the installation success.

Now you can play your favorite games.
Good Luck.