Broadcast to search available MySQL Server in Network?
I tried a lot of things. Knowing now: MySql is listening at... INET, TCP, Port 3306. Direct connection is possible! The server answered with its version. But what is with broadcast? Because I don't known were the servers! That is what I like to find out! Do any buddy know how to call a MySQL server in network via broadcast? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Broadcast to search available MySQL Server in Network?
Yes, I tried to find the port 3306, but MySQL doesn't answer! So, has MySQL a functionality to answer automatically? What is the port number MySQL is listening? What kind of family MySQL use? Do MySQL use UDP protocol? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Broadcast to search available MySQL Server in Network?
-Message d'origine- De : Manfred Süsens [mailto:[EMAIL PROTECTED] Envoyé : Saturday, January 03, 2004 7:58 AM À : [EMAIL PROTECTED] Objet : Re: Broadcast to search available MySQL Server in Network? Yes, I tried to find the port 3306, but MySQL doesn't answer! Maybe it is just not listening. Do you have skip-networking in your my.cnf by any chance? Is your server even started? How do you try to find the port? So, has MySQL a functionality to answer automatically? yes, of course, as long as the server is started and skip-neworking is not enabled. Using telnet you can check wether it is listening. telnet hostname 3306 should give you something like: Connected to hostname. Escape character is '^]'. 0 4.0.16-standard_l%q,%r4I, What is the port number MySQL is listening? 3306/tcp What kind of family MySQL use? Do MySQL use UDP protocol? no hth Ugo -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Broadcast to search available MySQL Server in Network?
Question: Is there a way to find available MySQL Server via broadcast in the network using Win-sockets? I have some data and want to send it to the SQL server. The user should see all available SQL server in a list, can chosen one (don't care MSSQL or MySQL) and the program will store the data automatically in the right way to the database. Here is the abbreviated sample to find all MSSQL servers available in the network (written in Borland Delphi (Win32)). How looks the code (IP-address and port) for MySQL? procedure ShowMSSQLServer; const Address='255.255.255.255'; begin //create a socket DBSocket:=socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP); //declare call back routine WSAAsyncSelect(DBSocket,self.Handle,CM_MSSQLCallBack,FD_READ); //setup SNDBUF:=0; TCPNODELAY:=1; BROADCAST:=1; setsockopt(DBSocket,SOL_SOCKET,SO_SNDBUF,PChar(@SNDBUF),sizeof(SNDBUF)); setsockopt(DBSocket,SOL_SOCKET,TCP_NODELAY,PChar(@TCPNODELAY),sizeof(TCPNODE LAY)); setsockopt(DBSocket,SOL_SOCKET,SO_BROADCAST,PChar(@BROADCAST),sizeof(BROADCA ST)); hostaddr.sin_family :=AF_INET; hostaddr.sin_port :=htons(1434); hostaddr.sin_addr.s_addr:=inet_addr(PChar(Address)); buf:=#02; //ping //ask all maschines sendto(DBSocket,buf,1,0,hostaddr,sizeof(hostaddr)); end;
Re: Broadcast to search available MySQL Server in Network?
Have you tried this code using: hostaddr.sin_port :=htons(3306); I've never done this but the code looks like it is checking the appropriate port on all machines found. See what happens when you use the MySQL default port. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]