Loading
Programmer bisa nggarap database liwat console, nanging iki ora ateges dheweke kudu nindakake. Ana akeh klien sing apik kanggo nggarap server SQL. Contone, aku seneng SQLYog. Wong hardcore terus bisa liwat console, lan akeh - langsung liwat Intellij IDEA.
Ya, dheweke uga ngerti cara kerja karo server SQL. Nanging amarga kita sinau MySQL ing kene, ing wektu sing padha kita bakal sinau babagan nggunakake Klien MySQL, sing asring digabungake. Iki diarani MySQL Workbench.
Langkah 1. Ayo tindakake link maneh banjur pilih link ing paling ngisor. Akibaté, sampeyan kudu ndeleng kaya iki:
![](https://cdn.codegym.cc/images/article/93d4d683-ce4f-4cbf-a7fa-67f4bd7ac4cc/512.jpeg)
Langkah 2. Pilih MySQL Workbench lan entuk kesempatan kanggo milih versi kanggo sistem operasi apa wae:
![](https://cdn.codegym.cc/images/article/444e135f-28e2-4a1e-aae4-ab1daeefa187/800.jpeg)
Ngundhuh lan mbukak instalasi.
Instalasi
Langkah 1. Kita miwiti instalasi lan ndeleng jendhela standar, klik Sabanjure:
![](https://cdn.codegym.cc/images/article/aa9b3bdb-fb8f-4720-88c9-88a9ad1bf68a/512.jpeg)
Langkah 2. Pilih direktori kanggo nginstal program.
![](https://cdn.codegym.cc/images/article/495e8ce5-a66e-4381-826c-0e2d03ced2d8/512.jpeg)
Langkah 3. Pilih konfigurasi standar:
![](https://cdn.codegym.cc/images/article/a8c95029-cd21-4c1c-8b5e-e8b90b9f38f4/512.jpeg)
Langkah 4. Instal:
![](https://cdn.codegym.cc/images/article/56426643-6d46-4c3d-be96-bbe06a1370ef/512.jpeg)
Langkah 5. Ing cilik saka instalasi sukses, sampeyan bakal weruh jendhela:
![](https://cdn.codegym.cc/images/article/9e5db0f2-1ae2-4a0c-85d6-226998d5f066/512.jpeg)
Sampeyan uga bakal nampa tawaran kanggo miwiti Workbench. Ayo ndeleng apa sing ana ing mburi iki ...
Nyambung menyang database
Aku ngluncurake Workbench lan nuduhake jendela standar:
![](https://cdn.codegym.cc/images/article/5caa4999-bbd4-4f7f-9659-d916df84a865/800.jpeg)
Ing sisih ngisor kaca, MySQL Workbench nampilake dhaptar sambungan paling anyar menyang macem-macem database. Yen sampeyan pengin nggawe sambungan anyar, banjur klik "tandha plus ing bunder" utawa nggunakake menu ndhuwur: Database-> Sambungake menyang Database.
![](https://cdn.codegym.cc/images/article/9c78179c-d908-4f2f-8d06-f6141d3dace7/800.jpeg)
Sanajan sampeyan arep nggunakake sambungan sing wis dikonfigurasi, sampeyan isih bisa dijaluk sandhi:
![](https://cdn.codegym.cc/images/article/23d59134-cbcc-4018-b874-4a036f7200c0/512.jpeg)
Yen sampeyan arep nggawe sambungan anyar, sampeyan bakal weruh panel kaya iki:
![](https://cdn.codegym.cc/images/article/8574b7ab-99e8-4961-82e2-df3e81c4e100/800.jpeg)
Kanthi Workbench, sampeyan bisa nyambung menyang server SQL ing donya, dadi sampeyan kudu nemtokake:
- alamat sawijining: host & port
- jeneng panganggo
- sandi (sampeyan bakal dijaluk kanggo nemtokake mengko)
Bener, sampeyan kudu milih jeneng sambungan - sampeyan bisa nulis apa wae sing disenengi, lan uga milih Skema Database.
Tabel ing basis data disusun dadi klompok sing disebut skema. Ing pangertèn, iki minangka basis data. Yaiku, siji skema yaiku siji basis data.
Ing sisih liya, tabel saka siji skema bisa ngrujuk menyang tabel saka skema liyane, bisa digabung, lan liya-liyane. Dadi skema isih minangka klompok tabel. Sejatine, kaya paket ing Jawa. Kelas ing siji paket luwih kuat hubungane karo saben liyane, nanging ing wektu sing padha, ora ana sing ngalangi dheweke saka ngrujuk menyang kelas saka paket liyane.
Status Server
Sawise mlebu, sampeyan bakal bisa ndeleng jendhela kanthi informasi umum lan informasi babagan server sing disambungake:
![](https://cdn.codegym.cc/images/article/e77ab056-5913-4ab6-a808-88401e4828ca/800.jpeg)
Ora ana regane kanggo kita ing kene, nanging yen sampeyan ngeklik link Status Server ing pojok kiwa ndhuwur, sampeyan bakal weruh sawetara rincian:
![](https://cdn.codegym.cc/images/article/26d4f668-a98d-4253-b1f0-463365abac16/1024.jpeg)
Cara ndeleng dhaptar database
Ayo mbukak dhaptar database (skema) ing server sing wis disambungake. Kanggo nindakake iki, bukak tab Skema :
![](https://cdn.codegym.cc/images/article/f13beead-aa80-4d76-8cfb-a4d1279d3e0a/1080.jpeg)
Yen sampeyan durung duwe skema, sampeyan bisa nggawe skema.