Showing posts with label HeidiSQL. Show all posts
Showing posts with label HeidiSQL. Show all posts

Saturday, September 5, 2020

Filling JSON Type to Mysql using HeidiSQL

 


Monday, February 5, 2018

MySQL Server has Gone Away

 Just left-click wamp icon then choose 'MySQL' then choose my.ini :
 Enlarge the size of 'max_allowed_packet' :
Restart wamp..... aaaanddd doneeee... ;)

Exporting and Importing Amazon RDS using HeidiSQL to Our local Devs Server

First thing first... Login to your amazon rds using heidi :

After that, right click on database that we wanted to export then choose 'Export database as SQL'...


Just hit 'Export' button and wait until it finishs.... :v

When it finished...


Next  step is importing the exported file to ourlocal server... So please running your xampp or wampp... and the connect the heidisql to your local server

Create a new database...

We can actually choose 'Load file(s) into the editor'..... ;)

and then just wait until it finished up... :v

Actually there is another way of thing this.... When exporting the sql from amazon we can actually automatically import it to our local like this :

Sunday, October 16, 2016

INNER JOIN in MySQL using HeidiSQL

Di sini dikasih liad contoh2 INNER JOIN di MySQL...Sebelumnya kita udh punya 3 biji table :
hisoka_table :
village_table :
village_type_table :
Nah... di hisoka_table ada village_id yang sama dengan ID di village_table. Terus di village_table ada village_type_id yang sama dengan ID di village_type_table.... Siiipss... Mari kita lihat INNER JOIN yang pertama. Querynya seperti ini :
Hasilnya :
Jadi hasilnya ngegabungin semua yaaak..... :D Semua columnya klihatan, klu pengen pilih beberapa colom ajjah, querynya seperti ini :
Hasilnya :
Naah... klihatan column2 yang kita pilih sendiri... :D

Terus kita jg bisa pake "alias" {AS} biar penulisannya pendek. Contoh :
Hasilnya sama dengan yang sebelumnya :
Terus klu kita pake ORDER_BY....{ASC = start dari kecil, DESC = start dr yg gede dl}
 Hasilnya
Terus klu di taroin WHERE, contohnya seperti ini :

Terus klu kita pengen INNER JOIN 3 biji table sekaligus, querynya seperti ini :
Hasilnya :
mmmm..... mkin ada baiknya klu di INNER JOIN lagi untuk table yg ke-4 {target_table}, cuman tabel ke-4 ini blom ada semua datanya...wkwkwk... kita lihat apa yang terjadi...
Pertama-tama kita lihat isi dari target_table :
Naaah... Isinya cm 1..... Terus klu kita pake INNER JOIN yang querynya seperti ini :
Hasilnya :
Jadi INNER JOIN cma ngambil apa yang ada dikedua table.... Klu kita pengen ambil isi dari hisoka_table ajjah, nnti pakenya LEFT JOIN kyk gini :
Hasilnya :
Teruuus yang terakhir... Klu kita pke RIGHT JOIN hasilnya cm 1 biji ajjah.. ko' bisa...? Soalnya yg right itu adalah yang tabel target_table dan target_table ini isinya cm 1 ajjah... :D... Contohnya seperti ini :

Yaaaps.... Pake prinsip irisan ajjah yang udah dipelajari di kelas 1 atau 2 smp... :D

Okie-dokie.... :)

Cukup sekian.....

Saturday, October 15, 2016

NOW, CURDATE, & CURTIME in MySQL

Contoh2nya seperti terlihat di bawah :




Creating new DB in HeidiSQL

After connecting HeidiSQL to our localhost db, next let's create a new db to play with... :D... Follow below pictures...
Next... Add a new column, hit "Add" button as shown above...Then edit the new column as shown below
Then create this CustomerID as Primary Key:
Okie... Let's add another table column....
Yuuups.... That's all of column that we need... Next... Let's put something to our table by using this sql query :

Result :

Yuuups..... That's all... :v

Connecting HeidiSQL to Our Localhost db

First thing first run your xampp mysql server...

Then let's run our HeidiSQL,
On the "Session Manager", hit "new" button and then we'll gonna get a new session as shown below :
Rename "Unnamed" session to whatever we like, I'm naming it like this :
 After that, just leave every field as default value {except for password, if your local db from xampp has a password put it there..} the hit "Open"...

This is my local db at first look...

Yaaaps.... That's all... :D
We can play many things from here.... B-)