Tuesday, November 24, 2020

Time : Basic Learning for Kid and Parent...

When my daughter got 7 years old, she asked me, how to answer the problem in time calculation easier.

She got some problem about starting time, duration and arriving time. She asked me, how to calculate it easily...

I just say, you can use most basic math operation, ( + ) or ( - )

Here : 

   A + B = C

   B = C - A

A : Starting Time

B : Duration

C : End Time/Arriving Time

To make easier, use 24 H clock time, and you can use all above simple formula

After she understand, she told to her teacher about the formula, and the teacher said, perfect...smart...thank you....



PuTTY - the Most Powerful Tool for Linux Developer

 If you begin to deploy Linux OS, you should use this tool for administering your Linux OS.

It's looks very simple, but very powerful terminal in the world.

Get Started...

1. After Linux installation finish, activate/enable openssh-server on your Linux

   open terminal, then type : 

   sudo apt update 

   sudo apt install openssh-server

   wait until installation complete and the service will start automatically

2. Download PuTTY

    https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

    You can choose portable or installer version. I use portable version

3. Run PuTTY

    Fill host name or ip server, you can save this session with custom name, and will listed on it for next works. Click Open and you will see dark terminal..., then start your command there....





Fill username & password of the Linux OS...then start type any command you want....
    
So Simple, but it can parse all Linux Command....

Happy scripting....


Thursday, March 14, 2019

Installing & Setup MySQL Database Community Server from ZIP

1. Dowload MySQL version from https://dev.mysql.com/downloads/mysql/

2. There is a folder inside the zip file, like this: mysql-5.6.43-winx64.zip,  Unzipped it to a directory. You may rename this folder as you like

3. To running up mysql, go to the mysql-5.6.43-winx64\bin folder, find file mysqld.exe, right click, choose Run As Administrator

Figure 1.

if you see command window like bellow, the mysql database already running and can be accessed with default port 3306

Figure 2.

To check mysql running status, use windows task manager in Process tab

Figure 3.

we can access mysql for the first time, by using windows's command prompt or sql tools like heidiSQL mysql workbench or other tools, with server address : localhost, username: root with blank password.

4. now we would like to change mysql root password using command prompt:
      - open command prompt

      - go to mysql directory then go to sub directory bin (d:\mysql-5.6.43-winx64\bin)

      - type : mysql -u root -p  ENTER

      - leave password field blank, ENTER

      - in command prompt just type like the bold font: 
            mysql> use mysql;  ENTER
            mysql> update users set password= PASSWORD('YOUR NEW PASSWORD') where username= 'root'; ENTER
            mysql> flush privileges; ENTER
            mysql> quit;

      - At this point, the root password has changed. You can check by login again from command prompt, type again: mysql -u root -p and fill the password with YOUR NEW PASSWORD above.

5. Close command prompt windows (Figure 2.) and check status process in (Figure 3.). If mysqld.exe disappears from Process tab (Figure 2.), it indicate that mysql was stopped. To register mysql service into windows service, go to point 4, and quit from mysql, and then type :
    
      d:\mysql-5.6.43-winx64\bin>mysqld --install  ENTER

Check the mysql service from windows task manager, go to Services tab, at the bottom window, click Open Services, find MySQL in the list, and check the status, if blank, just click button Start Service from toolbar, or right click, choose Start.

6. if you want to delete mysql service that already registered (point 5 above), just type 

     d:\mysql-5.6.43-winx64\bin>mysqld --remove  ENTER


Reff: MySQL documentation