How to reset MySQL root password

2 September 2008

One day you forgot your root password for your MySQL database server and blaming yourself for not written it somewhere for easy access.

Ok, do it no more! here's my short version (of official instruction) for advance user who does not need too much of instruction details

On Windows

  1. As admin, Stop the MySQL server, make sure it's completely stop
  2. Create a text file eg. C:mysql-init.txt and past the following statement in
    UPDATE mysql.user SET Password=PASSWORD('NewPassword') WHERE User='root';
    FLUSH PRIVILEGES;
  3. Open up your Windows Command Prompt
  4. Run this command
    C:mysqlbinmysqld-nt --init-file=C:mysql-init.txt

    Change path if your sever install on somewhere else.
    For wizard installation of mysql, you might have to do this

    "C:Program FilesMySQLMySQL Server 5.0binmysqld-nt.exe"
    --defaults-file="C:Program FilesMySQLMySQL Server 5.0my.ini"
    --init-file=C:mysql-init.tx
  5. Now delete C:mysql-init.txt then restart MySQL server again

On Linux or Unix

  1. Stop MySQL server as follow
    Find .pid file in /var/lib/mysql/, /var/run/mysqld/ and /usr/local/mysql/data/
  2. Now run
    $ kill `cat /mysql-data-directory/host_name.pid`
  3. Create a text file eg. /home/yourid/mysql-init and past the following statement in
    UPDATE mysql.user SET Password=PASSWORD('NewPassword') WHERE User='root';
    FLUSH PRIVILEGES;
  4. Start mysql server with the following options
    mysqld_safe --init-file=/home/me/mysql-init &
  5. Delete mysql-init file then finished

Alternative but less secure

  1. Stop mysqld and restart it with the --skip-grant-tables option.
  2. Connect to the mysqld server with this command
    $ mysql
  3. Now run the following statement
    UPDATE mysql.user SET Password=PASSWORD('NewPassword') WHERE User='root';
    FLUSH PRIVILEGES;
  4. Finished

Author: Manet Yim FAQ & Tip

Which [Free] Relational Database Server?

1 September 2008

When it comes to make a decision on which SQL server (Relational Database Management System) to choose for your application or for your company data storage, you might be associating with some people from different fields. Keep in mind that everyone of them would recommended the one they are currently using or the one they feel most comfortable with. What they recommended might not be 100% fitted into your project or it could be costing certain amount and it's out of your budget.

Some of those recommended products might be costing a fortune, usually it comes with support (for a limited time). You will have to regularly pay for that services monthly/yearly depends on the conditions and agreements.

If you experience with those kind of product, ask yourself this question now

How many time in a year you make a use of the support services you've paid for?

Usually the answer is second to none. Well, might as well don't spend a dollar on it?

If you are new to the development world, ask yourself this question

Do I (or we) have the foundation fund for the license fee?

No? then read on...

When you develop a software and it requires a relational database back-end you could take advantage of no-cost. It is in fact require very minimal foundation fund investing in your project and when you ship out your product to client, you could feature as "no additional cost on database server" attaches with your white paper of your product.

Here is a list of free relational database servers

  • MySQL - http://www.mysql.com
    The world's most popular open source database because of its consistent fast performance, high reliability and ease of use.
    It's also become the database of choice for a new generation of applications built on the LAMP stack (Linux, Apache, MySQL, PHP / Perl / Python.) MySQL runs on more than 20 platforms including Linux, Windows, OS/X, HP-UX, AIX, Netware, giving you the kind of flexibility that puts you in control.
  • PostgreSQL - http://www.postgresql.org
    Powerful, open source relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. It runs on all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows.
  • Apache Derby - http://db.apache.org/derby
    Open source relational database implemented entirely in Java. It has a small footprint, about 2 megabytes for the base engine and embedded JDBC driver. Good for light weight storage for embedded in a stand alone application.
  • SQLite - http://www.sqlite.org
    A small software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. It is used in countless desktop computer applications as well as consumer electronic devices including cellphones, PDAs, and MP3 players.
  • Firebird - http://www.firebirdsql.org
    A relational database offering many ANSI SQL-92 features that runs on Linux, Windows, and a variety of Unix platforms. Read Get to know Firebird in 2 minutes
  • H2 (Java) - http://www.h2database.com
    Another small and lightweight database engine, very fast and free. Only 1 MB footprint. Good for embedded in a stand alone application.
  • HSQLDB (Java) - http://www.hsqldb.org
    Java developers' best choice for development, testing and deployment of database applications

The bottom line is, before you go to deep, do more homework before you make decision.

Now, It's your turn to explore and learn more on which you chose to be the best suit.

Author: Manet Yim Software

How to Distributing a Java Web Start Application via CD-ROM

25 August 2008

Java Developer, if you have developed your Java Application and would like to distributed it on a media (namely CD-ROM) as an alternative with your online download, then this article is for you to consider.

This is a step by step guide written by Luan O'Carroll. It describes the steps involved in installing an application that installs both from CD and the internet. The installation process requires that:

  1. The installed application must check for updates and integrate with the JWS cache.
  2. The installation should work on a machine without an existing or up-to-date version of Java.
  3. The installed application should not require an internet connection.
  4. A installation must be easy to use and must provide a simple user interface.

Here is the link to his article

Distributing a Java Web Start Application via CD-ROM

Author: Manet Yim FAQ & Tip

VBA Auto Executor

24 August 2008

Sometimes when you need to execute a task every period of time and there's no straight predefined function that you can just call and use with a few lines of codes. You will actually need to implement your own module.

I've written this nice class module sometime ago and I believe it will be useful for other VB/VBA developer out there. This class is an Auto Executor, it will automatically call and run a defined Routine.

It will solve the problem in the scenario above and it is written in an object oriented style which you can just embedded the whole class in your project and when you need to use it, just create the instance of it then call the public sub routine to perform the task.

Read more...

Author: Manet Yim Programming

Blocking the ads on Firefox

24 August 2008

Browsing on internet could get frustrating sometimes when there are heavy load of ads on the website you are visiting. If you are on a slow speed connection, you'd just close the site go to an alternative one. However you might want to get some interesting information of that site, so you just have to put up with it! bad move..!

Not anymore..., if you are using Firefox "the web browser legend", you can now block a certain ads that you don't want them to load.

There are two ad-on available which has the same core function and does slightly different job, AdBlock and AdBlock Plus.AdBlock Plus

Here I am showing you how to use AdBlock Plus on Firefox and where to go when you need support or answer to the question you want to ask.

Get it

  • Go to Firefox Add-ons website and click on Add to Firefox
  • Accept and install it
  • Restart your Firefox
  • Now it will prompt with a filter subscription windows. Optionally you can subscribe one of them (I'd prefer the Easy List (USA) if I subscribe). However, you can do this latter whenever you wish.
  • You will notice the red icon button on the top right corner of your Firefox browser. This is where you can and edit your ads blocking preferences.

Personally, I block the ads manually, and only block those heavy graphic ads such as over-size, flash video/animation. I don't usually block text-base ads such as Google adsense or the like.

Read more...

Author: Manet Yim FAQ & Tip

Blender for 3D Graphics Design and Modeling

23 August 2008

You might be wondering of taking 3D Graphic design/modeling to be your hobby or to start your career

Blender

path. Nevertheless there are many software and tools available that you can use to start with and the good one might cost a lot of money to own a license. However the questions that might come into one's mind is, "I can't afford to pay for those commercial software, I don't mind something simple and free so I can take my first step in it. Is there one?"

This question has been a "frequently asked question".

Let's make it short. There is a free tool and it is a good tool for 3D graphic modeling

Read more...

Author: Manet Yim Software

Get all your IM accounts in one place

19 August 2008

When you are the move all the time you might not get access to your PCs everywhere you go and there are time with limitten internet access to your laptop (if you have one). Some day you might need to get access to your IM (Instant Messaging) account to talk to your friend or someone of your interest.

Now, this limitation has been overcame by Meebo.

Read more...

Author: Manet Yim FAQ & Tip

Virtualise your OS with VirtualBox

18 August 2008

VirtualBoxIs one OS not enough for you? Do you need a second PC to run different Operating System? Well, not anymore! you can now run more than one OS on a single computer.

What I am about to show you is one of the most powerful tool that is well fits your purpose and it's free of charge.

VirtualBox

It is a family of powerful x86 virtualisation products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL).

It targeted at server, desktop and embedded use, it is now the only professional-quality virtualisation solution that is also Open Source Software.

It runs on Windows, Linux, Macintosh and OpenSolari.

The core features including

  • Modularity
  • Virtual machine descriptions in XML
  • Guest Additions for Windows and Linux
  • Shared folders
  • Virtual USB Controllers
  • Remote Desktop Protocol
  • USB over RDP

see this page for detailed explainations

Have a look at some screenshots to see how you feel before you download it.

In the upcoming article, I will show you how to create a new virtual machine using this VirtualBox. So stay tuned :)

Author: Manet Yim Software

Text Editor – Notepad++

17 August 2008

Ever get frustrated with a classic windows notepad when you need to view your programming code?

Let's get a replacement! Notepad++ is a real alternative and it's free to use even in commercial environment. It shipped with a GPL license. It supports several different languages such as Java, C/C++, PHP, VB, XML, HTML, CSS and lots, lots more!

The following are the features of Notepad++

  • Syntax Highlighting and Syntax Folding
  • WYSIWYG
  • User Defined Syntax Highlighting
  • Auto-completion
  • Multi-Document
  • Multi-View
  • Regular Expression Search/Replace supported
  • Full Drag 'N' Drop supported
  • Dynamic position of Views
  • File Status Auto-detection
  • Zoom in and zoom out
  • Multi-Language environment supported
  • Bookmark
  • Brace and Indent guideline Highlighting
  • Macro recording and playback

Download a copy from here.

Happy editing :)

Author: Manet Yim Software

Java IDE – Eclipse

16 August 2008

Java perspective on Windows XPYou might be starting the university and doing Computer Science degree or a beginner to Java programming world. To day I am introducing you to the most powerful and a world recognised java programming IDE Eclipse.

This highlight below will pull you back to your seat,

Eclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle. A large and vibrant ecosystem of major technology vendors, innovative start-ups, universities, research institutions and individuals extend, complement and support the Eclipse platform.

FAQs page will answer a lot of the questions you might want to know.

Beyond this line, eclipse is not just there for Java application Development, it also support other languages as well such as PHP, C/C++ and COBAL. Last but not least, it is an platform independent. Regardless your platform is Windows, Linux, Unix, etc you will be carrying your knowledge on just one IDE, one work space, one project setting.

There are different editions of eclipse IDE you can download

Eclipse IDE for Java EE Developers

Eclipse Classic

Eclipse IDE for Java Developers

Eclipse IDE for C/C++ Developers

To find out more on the difference between these editions, have a look at this comparison page and download the right one to start your development.

Author: Manet Yim Software