Mysql Server Aktif atau gak?

Pemrograman Delphi

Mysql Server Aktif atau gak?

Postby pascal » 29 Jul 2011, 16:55

Ada yang tahu gak gimana cara/code untuk mengetahui server mysql 5.1 sedang aktif atau memang ada di suatu host. Biasanya saya coba langsung pake ZConnection, tapi kadang lama.

Trims.
User avatar
pascal
Member
 
Posts: 152
Joined: 16 May 2010, 23:25

RE: Mysql Server Aktif atau gak?

Postby D.E » 30 Jul 2011, 11:02

Bagaimana kalau di Ping?
:idea: Dude, if you don't understand the basics and just want to get someone else write the code for you, it means you really shouldn't study computer science. Find different field!
User avatar
D.E
Senior Member
 
Posts: 638
Joined: 04 May 2010, 18:12

RE: Mysql Server Aktif atau gak?

Postby n3o_cybertech » 30 Jul 2011, 13:40

klo komunikasi with socket dengan portnya spt mysql service gmn???kalo ada balasan ya brarti mysql aktif (lum pernah nyoba sih ) :D
Hit Image if this post useful! :wavespin:

Delphi Rock!
User avatar
n3o_cybertech
Senior Member
 
Posts: 273
Joined: 04 May 2010, 18:03

RE: Mysql Server Aktif atau gak?

Postby mas_kofa » 31 Jul 2011, 08:17

D.E wrote:Bagaimana kalau di Ping?


Di komponen DMysql ada fungsi buat ping.........
User avatar
mas_kofa
Senior Member
 
Posts: 344
Joined: 05 May 2010, 12:03
Location: Jakarta

RE: Mysql Server Aktif atau gak?

Postby pascal » 01 Aug 2011, 22:27

n3o_cybertech wrote:klo komunikasi with socket dengan portnya spt mysql service gmn???kalo ada balasan ya brarti mysql aktif (lum pernah nyoba sih ) :D

kurang ngerti soal socket :(

mas_kofa wrote:
D.E wrote:Bagaimana kalau di Ping?


Di komponen DMysql ada fungsi buat ping.........


saya pake komponen zeos, kalo di luar itu, bisa pake code apa yach?

Trims
User avatar
pascal
Member
 
Posts: 152
Joined: 16 May 2010, 23:25

RE: Mysql Server Aktif atau gak?

Postby D.E » 02 Aug 2011, 12:02

Sebenarnya bisa menggunakan cara sederhana, gunakan komponent TCPClient (Indy atau Synapse terserah):

1. Set timeout sekitar 5-10 detikan (sesuaikan selera)
2. Set host dimana database server berada, set port: 3306.
3. Jalankan Connect...

Kalau nyambung* berarti server aktif, jika tidak / err connect time out maka server tidak tersedia.
:idea: Dude, if you don't understand the basics and just want to get someone else write the code for you, it means you really shouldn't study computer science. Find different field!
User avatar
D.E
Senior Member
 
Posts: 638
Joined: 04 May 2010, 18:12


Who is online

Users browsing this forum: No registered users and 1 guest

cron