RES: [SPAM] RE: Remote connection
It´s working. The problem was related to grant permission. Thank you. Cheers, Hugo -Mensagem original- De: Gavin Towey [mailto:gto...@ffn.com] Enviada em: terça-feira, 4 de agosto de 2009 19:46 Para: Hugo Leonardo Ferrer Rebello; mysql@lists.mysql.com Assunto: [SPAM] RE: Remote connection 1.) remove bind-address= and skip-networking from my.cnf 2.) grant permission to the external 'user'@'host' 3.) remove any firewall rules blocking port 3306 4.) make sure no overrides on the mysqld commandline. See http://hashmysql.org/index.php?title=Remote_Clients_Cannot_Connect If you continue to have problems, give us the exact steps you have tried and the exact error message you are receiving. Please try to connect using the mysql command line. Regards, Gavin Towey -Original Message- From: Hugo Leonardo Ferrer Rebello [mailto:hugo.rebe...@t-systems.com.br] Sent: Tuesday, August 04, 2009 1:09 PM To: mysql@lists.mysql.com Subject: Remote connection Hello Guys, I have a big doubt. I'm trying to access the mysql database remotely, but I can't. I have changed the skip-networking option on my.cnf file however it doesn't work. I have tried to include the bind_address = 0.0.0.0 but it still doesn't work. Sure I have commented the skip-networking option before enable the bind_address. I don't know what else I must do. Please, anybody can help me ? Look at the error message below. # mysql -u root -p -h 192.168.12.50 Enter password: ERROR 1045 (28000): Access denied for user 'root'@'192.168.12.50' (using password: YES) Cheers, Hugo The information contained in this transmission may contain privileged and confidential information. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
RE: Remote connection
1.) remove bind-address= and skip-networking from my.cnf 2.) grant permission to the external 'user'@'host' 3.) remove any firewall rules blocking port 3306 4.) make sure no overrides on the mysqld commandline. See http://hashmysql.org/index.php?title=Remote_Clients_Cannot_Connect If you continue to have problems, give us the exact steps you have tried and the exact error message you are receiving. Please try to connect using the mysql command line. Regards, Gavin Towey -Original Message- From: Hugo Leonardo Ferrer Rebello [mailto:hugo.rebe...@t-systems.com.br] Sent: Tuesday, August 04, 2009 1:09 PM To: mysql@lists.mysql.com Subject: Remote connection Hello Guys, I have a big doubt. I'm trying to access the mysql database remotely, but I can't. I have changed the skip-networking option on my.cnf file however it doesn't work. I have tried to include the bind_address = 0.0.0.0 but it still doesn't work. Sure I have commented the skip-networking option before enable the bind_address. I don't know what else I must do. Please, anybody can help me ? Look at the error message below. # mysql -u root -p -h 192.168.12.50 Enter password: ERROR 1045 (28000): Access denied for user 'root'@'192.168.12.50' (using password: YES) Cheers, Hugo The information contained in this transmission may contain privileged and confidential information. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Remote connection
Are you sure that root has granted access to connect remotely ?? Carlos On 8/4/2009 3:09 PM, Hugo Leonardo Ferrer Rebello wrote: Hello Guys, I have a big doubt. I'm trying to access the mysql database remotely, but I can't. I have changed the skip-networking option on my.cnf file however it doesn't work. I have tried to include the bind_address = 0.0.0.0 but it still doesn't work. Sure I have commented the skip-networking option before enable the bind_address. I don't know what else I must do. Please, anybody can help me ? Look at the error message below. # mysql -u root -p -h 192.168.12.50 Enter password: ERROR 1045 (28000): Access denied for user 'root'@'192.168.12.50' (using password: YES) Cheers, Hugo -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
RE: Remote connection
May not have root access to remotely! Try to reconfigure the parameters of the engine. although it is not good idea to allow remote access to the root user!. Greetings, Pablo -Mensaje original- De: Hugo Leonardo Ferrer Rebello [mailto:hugo.rebe...@t-systems.com.br] Enviado el: Martes, 04 de Agosto de 2009 05:09 p.m. Para: mysql@lists.mysql.com Asunto: Remote connection Hello Guys, I have a big doubt. I'm trying to access the mysql database remotely, but I can't. I have changed the skip-networking option on my.cnf file however it doesn't work. I have tried to include the bind_address = 0.0.0.0 but it still doesn't work. Sure I have commented the skip-networking option before enable the bind_address. I don't know what else I must do. Please, anybody can help me ? Look at the error message below. # mysql -u root -p -h 192.168.12.50 Enter password: ERROR 1045 (28000): Access denied for user 'root'@'192.168.12.50' (using password: YES) Cheers, Hugo -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: remote connection
Chris, it's somewhat common for hosting companies to restrict outbound connections like what you describe. They may have a firewall preventing what you are trying to do. From your hosting account, can you telnet to your machine on port 3306 ? I get something like this: $ telnet 192.168.2.4 3306 Trying 192.168.2.4... Connected to 192.168.2.4. Escape character is '^]'. A 5.0.21-standard-log8E]&@R[Tq,^bSW;_ONv)gO and then after a couple of seconds, Connection closed by foreign host. If you can get this, then your connection is probably not restricted at the firewall. If you can't, then it probably is. HTH, Dan On 10/14/06, Chris W <[EMAIL PROTECTED]> wrote: I have set up a hosting account on godaddy and they have a ridiculously old version of mysql so I am trying to set it up to use the my server instead. But it refuses to connect. I can't figure out what could be the problem. I have tried connecting to my machine from a few other servers and they all connect fine. The only thing php gives me back is ... *Warning*: mysql_connect(): Lost connection to MySQL server during query in *Test.php* on line *18* Could not connect: Lost connection to MySQL server during query The user I am connecting with has host set to '%' with only one entry for that user. Can someone give me some ideas? Php info gives me this ... PHP Version 4.3.11 MySQL Client API version 3.23.49 My version of mysql is 4.1.15 and I have set it to use the old style password. Anyone have any ideas on what to look for? -- Chris W KE5GIX "Protect your digital freedom and privacy, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm"; Gift Giving Made Easy Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzone.com -- 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]
Re: Remote Connection Problem
Thanks Shawn. It seems to be just that. >>> [EMAIL PROTECTED] 08/08/05 03:02PM >>> "Kent Roberts" <[EMAIL PROTECTED]> wrote on 08/08/2005 04:50:15 PM: > I am having inconsistent behavior maintaining a remote connection > with MySql Administrator/Browser. Brand new installations of clients > on Windows XP and MySql server on Windows 2003 server. It worked > fine at first then suddenly I could no longer connect (Error #1045. > Access denied for user '[EMAIL PROTECTED]' Using password: YES). I tweaked > permissions to the [EMAIL PROTECTED] (MDAS2 is the name of the client > machine) to add SELECT for both the mysql and information_schema > schemas. Connections worked well for most of today when suddenly my > connection was no longer valid and now I can't connect again. Any ideas? > > Thanks in advance, > Kent Roberts > Missoula, MT > DNS issues? Reverse DNS lookups seem to be emerging as a weak point for MySQL. Try running your server with --skip-name-resolve and setting your permissions to be IP address (not domain name) specific and see if the problem persists. Shawn Green Database Administrator Unimin Corporation - Spruce Pine
Re: Remote Connection Problem
"Kent Roberts" <[EMAIL PROTECTED]> wrote on 08/08/2005 04:50:15 PM: > I am having inconsistent behavior maintaining a remote connection > with MySql Administrator/Browser. Brand new installations of clients > on Windows XP and MySql server on Windows 2003 server. It worked > fine at first then suddenly I could no longer connect (Error #1045. > Access denied for user '[EMAIL PROTECTED]' Using password: YES). I tweaked > permissions to the [EMAIL PROTECTED] (MDAS2 is the name of the client > machine) to add SELECT for both the mysql and information_schema > schemas. Connections worked well for most of today when suddenly my > connection was no longer valid and now I can't connect again. Any ideas? > > Thanks in advance, > Kent Roberts > Missoula, MT > DNS issues? Reverse DNS lookups seem to be emerging as a weak point for MySQL. Try running your server with --skip-name-resolve and setting your permissions to be IP address (not domain name) specific and see if the problem persists. Shawn Green Database Administrator Unimin Corporation - Spruce Pine
Re: remote connection
Hi, haven't you added "identified by *" int he grant statement. I don't see it in your show grants comand. Mathias Selon Chris Faulkner <[EMAIL PROTECTED]>: > Hello > > I am trying to connect from host 192.168.0.8 on my home network to a > database on 192.168.0.7. When I connect as root on 192.168.0.7 itself, > I can do this > > mysql> show grants for 'root'@'192.168.0.8'; > ++ > | Grants for [EMAIL PROTECTED]| > ++ > | GRANT USAGE ON *.* TO 'root'@'192.168.0.8' | > ++ > 1 row in set (0.00 sec) > > However, when I try to connect from 192.168.0.8, I get an error (1045: > Access denied). What else do I have to do ? > > Thanks > > Chris > > -- > 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]
Re: remote connection problem
Hello. Your server listens only on a single interface. Options could be given in different ways, not only from configuration file. If you want MySQL server to listen on every interface you should find where the bind option is given and remove it. See: http://dev.mysql.com/doc/mysql/en/program-options.html Andy McHargue <[EMAIL PROTECTED]> wrote: > [-- text/plain, encoding 7bit, charset: us-ascii, 29 lines --] > > I'm having trouble connecting remotely from Server A (local) to Server B > (remote). Both Linux. > > From Server A, I'm issuing this command > mysql -h [domain.com] -u [user] -p > > And I get > ERROR 2003: Can't connect to MySQL server on 'domain.com' (110) > I assume this is a time out. > > 1. The user on Server B is set up with all privileges. > 2. Server B's my.cnf has the line "bind-address=127.0.0.1" but it is > commented out with # > 3. Server B's skip_networking is OFF. > 4. A netstat -tl on Server B gives the line > tcp0 0 domain.com:3306 *:* LISTEN > > I notice that on a different server, I get this > tcp0 0 *:mysql > *:* LISTEN > > and there's no line containing 3306. > > What's with that? > > 5. for troubleshooting's sake, ssh [remote-ip] -p 3306 times out. > telnet is unavailable. > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: remote connection problem
Hello. After checking that MySQL server listens on the interface to which you are connecting, solve network problems. If you're able to connect from one host to another it doesn't mean that the opposite is true. Andy McHargue <[EMAIL PROTECTED]> wrote: > Here's some more data on this, if anyone can help. > > --I can connect the other way around ... i.e. I can connect from B to > A. So there's no general connectivity problem. > --did an nmap on B, > $ nmap -sT -T Polite -p3306 xx.com > > Starting nmap V. 2.54BETA22 ( www.insecure.org/nmap/ ) > Interesting ports on s191.n33.xx.com (66.84.xx.xx): > Port State Service > 3306/tcp filteredmysql > > nmap on B indicates 'open' rather than 'filtered' ... how can i change? > > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: remote connection problem
Here's some more data on this, if anyone can help. --I can connect the other way around ... i.e. I can connect from B to A. So there's no general connectivity problem. --did an nmap on B, $ nmap -sT -T Polite -p3306 xx.com Starting nmap V. 2.54BETA22 ( www.insecure.org/nmap/ ) Interesting ports on s191.n33.xx.com (66.84.xx.xx): Port State Service 3306/tcp filteredmysql nmap on B indicates 'open' rather than 'filtered' ... how can i change? Andy McHargue wrote: I'm having trouble connecting remotely from Server A (local) to Server B (remote). Both Linux. From Server A, I'm issuing this command mysql -h [domain.com] -u [user] -p And I get ERROR 2003: Can't connect to MySQL server on 'domain.com' (110) I assume this is a time out. 1. The user on Server B is set up with all privileges. 2. Server B's my.cnf has the line "bind-address=127.0.0.1" but it is commented out with # 3. Server B's skip_networking is OFF. 4. A netstat -tl on Server B gives the line tcp0 0 domain.com:3306 *:* LISTEN I notice that on a different server, I get this tcp0 0 *:mysql *:* LISTEN and there's no line containing 3306. What's with that? 5. for troubleshooting's sake, ssh [remote-ip] -p 3306 times out. telnet is unavailable. -- Andy McHargue Webmaster Annenberg School for Communication University of Southern California http://annenberg.usc.edu [EMAIL PROTECTED] Phone: 213.740.1290 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: remote connection problem
Not necessary to change my.cnf, unless --skip-networking was specified. Also assuming that you are using port 3306. mysql> show variables like 'port'; +---+---+ | Variable_name | Value | +---+---+ | port | 3306 | +---+---+ 1 row in set (0.00 sec) Can you verify that network traffic is getting from your remote client to the MySQL server? When you attempt to connect, do you see network packets coming to port 3306 on the MySQL server machine? On Tue, 2005-03-22 at 16:35 -0600, gerardo Villanueva wrote: > I execute your query and > the skip_networking is OFF. > the file my.cnf, have to ubicated in C:\my.cnf or is > not > necesary?? > > Regards > > Gerardo Campos > > _ > Do You Yahoo!? > InformaciÃn de Estados Unidos y AmÃrica Latina, en Yahoo! Noticias. > VisÃtanos en http://noticias.espanol.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: remote connection problem
One other thing to check, make sure --skip-networking isn't specified in your configuration. mysql> show variables like 'skip_networking'; +-+---+ | Variable_name | Value | +-+---+ | skip_networking | OFF | +-+---+ 1 row in set (0.00 sec) If the value is ON, you won't be allowed to make connections to the server via TCP/IP. On Tue, 2005-03-22 at 15:43 -0600, gerardo Villanueva wrote: > I have mysql version 4.0.15-nt in a server NT, I can > connecting with mysql localy, but when i try remote > connection the error is: > "Error Number 2003 Can't connect to MySQL server on > 'IP' (10060) " . > I use mysql odbc 3.51 > Is necesary the file my.cnf in c:\my.cnf > > Regards > > Gerardo Campos > > _ > Do You Yahoo!? > InformaciÃn de Estados Unidos y AmÃrica Latina, en Yahoo! Noticias. > VisÃtanos en http://noticias.espanol.yahoo.com > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: remote connection problem
When you are running as root, but are you running as 'root'@'%' or 'root'@'localhost'? This does make a big difference. The '%' means all network connections, which isn't secure. I would only using it as testing purposes. However, because your error message says that you cannot see the server, are you sure that your remote connection can see the NT server? This may be a bigger problem, i.e. DNS or IP routing/access lists. You may also want to check the .err logs on the MySQL server to see if there is a connection problem there. J.R. -Original Message- From: gerardo Villanueva [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 22, 2005 5:03 PM To: [EMAIL PROTECTED] Subject: RE: remote connection problem 1.- Yes I have a firewall but the port 3306 is open 2.- Mysql is running in the server 3.- I connecting with user root and his has all the permissions I try to remote connection to my server NT 4.0 , mysql run there. Gerardo Campos _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com smime.p7s Description: S/MIME cryptographic signature
RE: remote connection problem
1) Are you running a firewall? If so, make sure that port 3306 is open. 2) Is your MySQL server is up and running? 3) Do you have the correct permissions to connect to the server via your mysql.hosts table? Just some thoughts. J.R. -Original Message- From: gerardo Villanueva [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 22, 2005 4:43 PM To: mysql@lists.mysql.com Subject: remote connection problem I have mysql version 4.0.15-nt in a server NT, I can connecting with mysql localy, but when i try remote connection the error is: "Error Number 2003 Can't connect to MySQL server on 'IP' (10060) " . I use mysql odbc 3.51 Is necesary the file my.cnf in c:\my.cnf Regards Gerardo Campos _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: Remote Connection via Toad for MySQL
You can try SQLyog (www.webyog.com), it supports 3.23.x to 5.0. Lightweight and very fast! Karam --- [EMAIL PROTECTED] wrote: > Good good. > > On 24 Feb 2005, at 20:46, > [EMAIL PROTECTED] wrote: > > BINGO!!! > Thanks Dan! > Kelly > > > > Daniel Walker <[EMAIL PROTECTED]> > What version of MySQL are you using? 4.1.1 uses an > enhanced password > hashing system that isn't compatible with clients > built for older > versions. > > This page on MySQL's own documentation provides a > number of workarounds, > one of which will hopefully work in your case > (assuming the problem is > caused by the version number of your DBM, of course > ;) > > http://dev.mysql.com/doc/mysql/en/old-client.html > > HTH > > Daniel Walker > > On 24 Feb 2005, at 20:35, > [EMAIL PROTECTED] wrote: > > Client does not support authentication > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: remote connection with 4.0.22 on win32
Hello. See: http://dev.mysql.com/doc/mysql/en/Access_denied.html "Massimo Petrini" <[EMAIL PROTECTED]> wrote: > I upgraded my server to 4.0.22 from 4.0.17. The server itselfs runs > correctly (it is a slave member of my domain). But if I try to connect from > a remote client with mysql administrator, I receive this error: > Could not connect to the specified instance > Mysql error number 1130 > Host "name" is not allowed to connect tothis MYSQL sever > > The ping result correct. > > Which is my configuration error ? (see my.ini below) > > Thanks > Massimo > > -- > > > # The MySQL server > [mysqld] > port=3306 > #socket=MySQL > skip-locking > set-variable=key_buffer=16K > set-variable=max_allowed_packet=16M > set-variable=thread_stack=64K > set-variable=table_cache=4 > set-variable=sort_buffer=1024K > set-variable=net_buffer_length=2K > > #PARTE PER REPLICA > > server-id=33 > master-host=SEURAT > report-host=SEURAT > master-user=root > replicate-wild-ignore-table=OMTWRK.WRK_% > replicate-wild-ignore-table=omtwrk.wrk_% > set-variable=slave-net-timeout=172800 > > #skip-slave-start > # Uncomment the following if you want to log updates > #log-bin > > # Uncomment the following rows if you move the MySQL distribution to another > # location > basedir=C:\mysql\ > #datadir=C:\AnnaNoBck\DATI\MySQL\data\ > datadir=D:\mysql\Data\ > > > log-error=d:\mysql\data\mysql.err > > # Uncomment the following if you are NOT using BDB tables > skip-bdb > > # Uncomment the following if you are using Innobase tables > innodb_data_file_path=\InnoData\HymnOMT:10M:autoextend > > #innodb_data_home_dir=C:\AnnaNoBck\DATI\MySQL\InnoDB > #innodb_log_group_home_dir=C:\AnnaNoBck\DATI\MySQL\InnoDB\InnoLog > #innodb_log_arch_dir=C:\AnnaNoBck\DATI\MySQL\InnoDB\InnoLog > > innodb_data_home_dir=D:\mysql\InnoDB > innodb_log_group_home_dir=D:\mysql\InnoDB\InnoLog > innodb_log_arch_dir=D:\mysql\InnoDB\InnoLog > > set-variable=innodb_mirrored_log_groups=1 > set-variable=innodb_log_files_in_group=3 > set-variable=innodb_log_file_size=5M > set-variable=innodb_log_buffer_size=8M > innodb_flush_log_at_trx_commit=1 > innodb_log_archive=0 > set-variable=innodb_buffer_pool_size=16M > set-variable=innodb_additional_mem_pool_size=16M > set-variable=innodb_file_io_threads=4 > set-variable=innodb_lock_wait_timeout=50 > default-table-type=innodb > > [mysqldump] > quick > set-variable=max_allowed_packet=16M > > [mysql] > no-auto-rehash > # Remove the next comment character if you are not familiar with SQL > #safe-updates > > [isamchk] > set-variable=key_buffer=8M > set-variable=sort_buffer=8M > > [myisamchk] > set-variable=key_buffer=8M > set-variable=sort_buffer=8M > > [mysqlhotcopy] > interactive-timeout > > [WinMySQLAdmin] > Server=C:/mysql/bin/mysqld-max-nt.exe > > > - > Massimo Petrini > c/o Omt spa > Via Ferrero 67/a > 10090 Cascine Vica (TO) > Tel.+39 011 9505334 > Fax +39 011 9575474 > E-mail [EMAIL PROTECTED] > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: remote connection php code
> Hi All > Could someone give me a clue or a snippet of PHP code I can test a romte > connection to my MySQL DB for my website please? Just take the one you're currently using and replace 'localhost' with 'someotherserver.com' $cnx = mysql_connect('someotherserver.com','uname','pword'); mysql_select_db('dbname',$cnx); mysql_query('Select * from table',$cnx); etc As long as the GRANT's are set up to accept connections from an exteral client and Firewall ports are open(if needed), it will not differ much from local testing. HTH Jeff > Thank you > Andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: remote connection
For anyone else that stumbles over this problem, there were two problems... 1. My firewall was blocking the remote mysql port (duh) 2. Unlike what I expected from reading the docs, I had to give my remote user rights in the user table (Select_priv='Y', Insert_priv='Y', etc.) to get a connection. I'm still not sure why this should be (I'm willing to be told), but it works, so I'm happy. -- John Identry, LLC Northport, NY 11768 Ph: 631.754.8440 Fx: 631.980.4262 Em: [EMAIL PROTECTED] Member: ASDA, APS, ANA, Ephemera Society of America, Long Island Web Developers Guild <><><><><><><><><><><><><><><><><><><><><><><><> Visit us at: www.identry.com Building You A Better Online Business <><><><><><><><><><><><><><><><><><><><><><><><> -Original Message- From: Curtis Maurand [mailto:[EMAIL PROTECTED] Sent: Friday, November 07, 2003 10:57 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: remote connection For some reason, MySQL treats "localhost" as a special case (at least that seems to be the behavior." If you run grant on to user@'%' identified by 'password'; will allow login from anywhere but the localhost. That account must be created seperately. Curtis John Almberg said: > Yes I was already pretty sure it was a rights issue. What I'm trying > to do is modify the rights for a particular user so I can log in > remotely. The question is what I should use for the host fields in the > various tables so that I can log in remotely *and* the web server can > log in through localhost. > > Problem is, everything I try blocks access from everywhere, even when I > use '%'. I did some more reading last night and figured out that it has > something to do with the sorting done in the first connection phase. I > think just changing the host field to '%' or '%.optonline.net' actually > lowers that user account below one of the default accounts (one with a > blank in the User field), so that I'm logging in on the other account. > > I'm sure there's a logic behind this set up, so I'm not changing it > haphazardly, but the logic escapes me at the moment! > > -- John > > > Identry, LLC > Northport, NY 11768 > > Ph: 631.754.8440 > Fx: 631.980.4262 > Em: [EMAIL PROTECTED] > > Member: ASDA, APS, ANA, Ephemera Society > of America, Long Island Web Developers Guild > > <><><><><><><><><><><><><><><><><><><><><><><><> >Visit us at: www.identry.com >Building You A Better Online Business > <><><><><><><><><><><><><><><><><><><><><><><><> > > > > > > -Original Message- > From: Curtis Maurand [mailto:[EMAIL PROTECTED] > Sent: Friday, November 07, 2003 1:44 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: remote connection > > > Its a permissions thing on the server end. You have to have set up a > user > account on the server. Very important are hostnames. > > Curtis > > John Almberg said: >> I'm trying to set up a remote connection to a mysql database using > Perl >> DBI. I have done this without problem on another database. I suspect > the >> rights are set up differently on this one. I have root access. >> >> When I try to connect, I get the following error (hostname, username, >> password have been edited for the purpose of this email): >> >> DBI connect('database:host','user','password') failed: Host >> 'ool-182f1a5f.dyn.optonline.net' is not allowed to connect to this > MySQL >> server at D:\My Documents\Identry Shared\Operations\Stamp Center -- >> website\database\update_inv.pl line 7 >> >> After reading section 4.2.8 in the manual (Connecting to the MySQL >> Server), I am pretty sure this is a rights problem. The user I am > trying >> to connect as has 'localhost' set in the Host field of both the 'user' >> and 'db' tables. There are no entries whatsoever in the 'host' table. >> >> What I
RE: remote connection
For some reason, MySQL treats "localhost" as a special case (at least that seems to be the behavior." If you run grant on to user@'%' identified by 'password'; will allow login from anywhere but the localhost. That account must be created seperately. Curtis John Almberg said: > Yes I was already pretty sure it was a rights issue. What I'm trying > to do is modify the rights for a particular user so I can log in > remotely. The question is what I should use for the host fields in the > various tables so that I can log in remotely *and* the web server can > log in through localhost. > > Problem is, everything I try blocks access from everywhere, even when I > use '%'. I did some more reading last night and figured out that it has > something to do with the sorting done in the first connection phase. I > think just changing the host field to '%' or '%.optonline.net' actually > lowers that user account below one of the default accounts (one with a > blank in the User field), so that I'm logging in on the other account. > > I'm sure there's a logic behind this set up, so I'm not changing it > haphazardly, but the logic escapes me at the moment! > > -- John > > > Identry, LLC > Northport, NY 11768 > > Ph: 631.754.8440 > Fx: 631.980.4262 > Em: [EMAIL PROTECTED] > > Member: ASDA, APS, ANA, Ephemera Society > of America, Long Island Web Developers Guild > > <><><><><><><><><><><><><><><><><><><><><><><><> >Visit us at: www.identry.com >Building You A Better Online Business > <><><><><><><><><><><><><><><><><><><><><><><><> > > > > > > -Original Message- > From: Curtis Maurand [mailto:[EMAIL PROTECTED] > Sent: Friday, November 07, 2003 1:44 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: remote connection > > > Its a permissions thing on the server end. You have to have set up a > user > account on the server. Very important are hostnames. > > Curtis > > John Almberg said: >> I'm trying to set up a remote connection to a mysql database using > Perl >> DBI. I have done this without problem on another database. I suspect > the >> rights are set up differently on this one. I have root access. >> >> When I try to connect, I get the following error (hostname, username, >> password have been edited for the purpose of this email): >> >> DBI connect('database:host','user','password') failed: Host >> 'ool-182f1a5f.dyn.optonline.net' is not allowed to connect to this > MySQL >> server at D:\My Documents\Identry Shared\Operations\Stamp Center -- >> website\database\update_inv.pl line 7 >> >> After reading section 4.2.8 in the manual (Connecting to the MySQL >> Server), I am pretty sure this is a rights problem. The user I am > trying >> to connect as has 'localhost' set in the Host field of both the 'user' >> and 'db' tables. There are no entries whatsoever in the 'host' table. >> >> What I want to do is to add the ability for my Perl program to connect >> as a certain user (call him 'bob') from a certain IP address. >> Unfortunately, all my attempts result block access from every host, > even >> localhost. Thus, even the webserver can't access the database. >> >> In desperation, I've even tried using '%' in the Host fields of both >> user & db tables. This doesn't work, either, so I'm obviously missing >> something. >> >> Any help much appreciated! >> >> Brgds: John >> >> >> Identry, LLC >> Northport, NY 11768 >> >> Ph: 631.754.8440 >> Fx: 631.980.4262 >> Em: [EMAIL PROTECTED] >> >> Member: ASDA, APS, ANA, Ephemera Society >> of America, Long Island Web Developers Guild >> >> <><><><><><><><><><><><><><><><><><><><><><><><> >>Visit us at: www.identry.com >>Building You A Better Online Business >> <><><><><><><><><><><><><><><><><><><><><><><><> >> >> >> >> >> >> >> >> >> -- >> 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] > > > > -- > 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]
RE: remote connection
Yes I was already pretty sure it was a rights issue. What I'm trying to do is modify the rights for a particular user so I can log in remotely. The question is what I should use for the host fields in the various tables so that I can log in remotely *and* the web server can log in through localhost. Problem is, everything I try blocks access from everywhere, even when I use '%'. I did some more reading last night and figured out that it has something to do with the sorting done in the first connection phase. I think just changing the host field to '%' or '%.optonline.net' actually lowers that user account below one of the default accounts (one with a blank in the User field), so that I'm logging in on the other account. I'm sure there's a logic behind this set up, so I'm not changing it haphazardly, but the logic escapes me at the moment! -- John Identry, LLC Northport, NY 11768 Ph: 631.754.8440 Fx: 631.980.4262 Em: [EMAIL PROTECTED] Member: ASDA, APS, ANA, Ephemera Society of America, Long Island Web Developers Guild <><><><><><><><><><><><><><><><><><><><><><><><> Visit us at: www.identry.com Building You A Better Online Business <><><><><><><><><><><><><><><><><><><><><><><><> -Original Message- From: Curtis Maurand [mailto:[EMAIL PROTECTED] Sent: Friday, November 07, 2003 1:44 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: remote connection Its a permissions thing on the server end. You have to have set up a user account on the server. Very important are hostnames. Curtis John Almberg said: > I'm trying to set up a remote connection to a mysql database using Perl > DBI. I have done this without problem on another database. I suspect the > rights are set up differently on this one. I have root access. > > When I try to connect, I get the following error (hostname, username, > password have been edited for the purpose of this email): > > DBI connect('database:host','user','password') failed: Host > 'ool-182f1a5f.dyn.optonline.net' is not allowed to connect to this MySQL > server at D:\My Documents\Identry Shared\Operations\Stamp Center -- > website\database\update_inv.pl line 7 > > After reading section 4.2.8 in the manual (Connecting to the MySQL > Server), I am pretty sure this is a rights problem. The user I am trying > to connect as has 'localhost' set in the Host field of both the 'user' > and 'db' tables. There are no entries whatsoever in the 'host' table. > > What I want to do is to add the ability for my Perl program to connect > as a certain user (call him 'bob') from a certain IP address. > Unfortunately, all my attempts result block access from every host, even > localhost. Thus, even the webserver can't access the database. > > In desperation, I've even tried using '%' in the Host fields of both > user & db tables. This doesn't work, either, so I'm obviously missing > something. > > Any help much appreciated! > > Brgds: John > > > Identry, LLC > Northport, NY 11768 > > Ph: 631.754.8440 > Fx: 631.980.4262 > Em: [EMAIL PROTECTED] > > Member: ASDA, APS, ANA, Ephemera Society > of America, Long Island Web Developers Guild > > <><><><><><><><><><><><><><><><><><><><><><><><> >Visit us at: www.identry.com >Building You A Better Online Business > <><><><><><><><><><><><><><><><><><><><><><><><> > > > > > > > > > -- > 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] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: remote connection
Its a permissions thing on the server end. You have to have set up a user account on the server. Very important are hostnames. Curtis John Almberg said: > I'm trying to set up a remote connection to a mysql database using Perl > DBI. I have done this without problem on another database. I suspect the > rights are set up differently on this one. I have root access. > > When I try to connect, I get the following error (hostname, username, > password have been edited for the purpose of this email): > > DBI connect('database:host','user','password') failed: Host > 'ool-182f1a5f.dyn.optonline.net' is not allowed to connect to this MySQL > server at D:\My Documents\Identry Shared\Operations\Stamp Center -- > website\database\update_inv.pl line 7 > > After reading section 4.2.8 in the manual (Connecting to the MySQL > Server), I am pretty sure this is a rights problem. The user I am trying > to connect as has 'localhost' set in the Host field of both the 'user' > and 'db' tables. There are no entries whatsoever in the 'host' table. > > What I want to do is to add the ability for my Perl program to connect > as a certain user (call him 'bob') from a certain IP address. > Unfortunately, all my attempts result block access from every host, even > localhost. Thus, even the webserver can't access the database. > > In desperation, I've even tried using '%' in the Host fields of both > user & db tables. This doesn't work, either, so I'm obviously missing > something. > > Any help much appreciated! > > Brgds: John > > > Identry, LLC > Northport, NY 11768 > > Ph: 631.754.8440 > Fx: 631.980.4262 > Em: [EMAIL PROTECTED] > > Member: ASDA, APS, ANA, Ephemera Society > of America, Long Island Web Developers Guild > > <><><><><><><><><><><><><><><><><><><><><><><><> >Visit us at: www.identry.com >Building You A Better Online Business > <><><><><><><><><><><><><><><><><><><><><><><><> > > > > > > > > > -- > 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]
Re: remote connection 4
At 22:55 +0200 10/4/03, Ms Carlsson wrote: when i try to connect to my mysql database from another machine i get a error like this %mysql -h domain.com -u tellus ERROR 2003: Can't connect to MySQL server on 'domain.com' (61) The port don't listen Apparently the MySQL server on domain.com is not running. Or perhaps domain.com is firewalled and doesn't allow connections to the MySQL port. and this is disabled in my.cfg # #skip-networking whats wrong and how do i allow remote connections? -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: remote connection with JDBC
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Erwin Adi wrote: I can connect to MySQL through JDBC with the following URL without any problem: jdbc:mysql://localhost:3306/mydatabase However, when I simulate the above URL as though I'm calling from a remote machine using the following URL, jdbc:mysql://192.168.0.10:3306/mydatabase I got the following exception (the file name is Lookup.java) : Exception in thread "main" java.sql.SQLException: Communication link failure: java.io.IOException at com.mysql.jdbc.MysqlIO.init(Unknown Source) at com.mysql.jdbc.Connection.connectionInit(Unknown Source) at com.mysql.jdbc.jdbc2.Connection.connectionInit(Unknown Source) at com.mysql.jdbc.Driver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at Lookup.main(Lookup.java:16) I would very much appreciate if anybody could tell me how to connect the database from a remote machine (if possible with which library to import from). Thank you very much in advance. What OS is running on the remote machine? It looks like it is RedHat-8.0. On RedHat 8.0, if you use RedHat's mysql binaries, remote TCP/IP connections won't work. If this is the case, please try one of our binaries, and also look at the directions here: http://www.mysql.com/doc/en/Linux-x86.html -Mark - -- MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA <___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+deX2tvXNTca6JD8RArUNAJ4vIuve3vU697q3GlwqQRw0/19BfwCfVt9z OdIEp97O8cLJAEdoOtcoYeM= =sZDH -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Remote Connection, please help
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Muhammad Salman wrote: > Dear Mark, real thanks , Are you refering to this > issues: > > Issue: > > "When I try to connect to the database with MySQL > Connector/J , I get the > following exception: > Yes. [snip] >>>Thanks Mark for your real quick response. The >> >>error I >> >>>am getting is when I try to connect with the >> >>machine's >> >>>ip is : >>> >>>Invalid authorization specification: Access denied >> >>for >> >>>user: >>>'***@**' >>>(Using password: YES) >>> >>>But when I connect it with localhost instead of >> >>the ip >> >>>I am able to connect to MySQL, by putting the code >> >>on >> >>>the same machine. This machine has several >> >>databases Your permissions are not setup correctly. You need to add GRANTs to allow this to happen as it appears that none currently exist that do allow it. You need to do a "GRANT [foo] ON [blah] TO 'user'@'host' identified by 'some_password'" to get this to work. I am deliberately leaving out what you need to put in for [foo] and [blah], because you _really_ need to read the MySQL manual (http://www.mysql.com/doc/en/GRANT.html) and understand exactly what you're doing here. -Mark -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE9+N9WtvXNTca6JD8RAtpRAJ9+mZRg4gudtabx3yREo2RD+tNj/wCeKuOJ KeCv39g/Agxk4WG1m0PGFXo= =LyU/ -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Remote Connection, please help
Subject: Remote Connection, please help I am using the official type 4 mysql driver from www.mysql.com but unable to make a remote connection with the mysql database running on our companie's remote server. I mailed some mailing mailing lists but didnt find out the right answer yet. I am using the following code for simple remote connection test: Class.forName("org.gjt.mm.mysql.Driver").newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql://66.137.7.185:3306/prefill","prefill","jeem"); Are there no Exceptions thrown? - Cs. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Remote Connection, please help
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 first a note: this is a topic best discussed on [EMAIL PROTECTED] * On Thu, Dec 12, 2002 at 08:35:40AM -0800, Muhammad Salman wrote: > I am using the official type 4 mysql driver from > www.mysql.com but unable to make a remote connection > with the mysql database running on our companie's > remote server. I mailed some mailing mailing lists but > didnt find out the right answer yet. I am using the > following code for simple remote connection test: > > Class.forName("org.gjt.mm.mysql.Driver").newInstance(); > Connection con = > >DriverManager.getConnection("jdbc:mysql://66.137.7.185:3306/prefill","prefill","jeem"); > out.println("Testing Database Connectivity"); > Statement stmt = con.createStatement(); > ResultSet rs = stmt.executeQuery("select * from > state"); > int i = 0; > while(rs.next() && i < 10) > { > out.println(" Output: "+rs.getString(2) + > ""); > i ++; > } > rs.close(); > stmt.close(); > con.close(); that all looks pretty good. what error are you getting? have you checked out the readme that comes with the driver? it is pretty good at addressing some of the more often run into problems of this variety. - -- Peter Abplanalp PGP: pgp.mit.edu -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9+NFVggA8sH0iRXQRArzMAJwLngnF/ouMCFMEEU846oExQE3H5gCgsrGv IICJvZ3VPu4+MUtBAKsTAkU= =NLko -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Remote Connection, please help
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Muhammad Salman wrote: I am using the official type 4 mysql driver from www.mysql.com but unable to make a remote connection with the mysql database running on our companie's remote server. I mailed some mailing mailing lists but didnt find out the right answer yet. I am using the following code for simple remote connection test: Class.forName("org.gjt.mm.mysql.Driver").newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql://66.137.7.185:3306/prefill","prefill","jeem"); out.println("Testing Database Connectivity"); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("select * from state"); int i = 0; while(rs.next() && i < 10) { out.println(" Output: "+rs.getString(2) + ""); i ++; } rs.close(); stmt.close(); con.close(); Your quick response will be highly appreciated. You need to tell us what the error you're receiving is, otherwise we can't be of much help. -Mark - -- MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA <___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE9+MnBtvXNTca6JD8RAkxBAJ9tZD8OF6XByll9AW7IPabqMBZbiQCfdx4g 0lK6FUi8jP331x9czJqqK/E= =kn1O -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Remote Connection, please help
I've never connected your way before. I'm using J/Connector from the MySQL site (http://www.mysql.com/downloads/api-jdbc-stable.html). That way I have no problems connecting. I do it this way: // connect to the database Class.forName("com.mysql.jdbc.Driver"); Connection dbConnection = DriverManager.getConnection("jdbc:mysql://localhost/myTable", "username", "password"); Works like a charm. Give it a try... -Pete -Original Message- From: Muhammad Salman [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:36 To: [EMAIL PROTECTED] Subject: Remote Connection, please help I am using the official type 4 mysql driver from www.mysql.com but unable to make a remote connection with the mysql database running on our companie's remote server. I mailed some mailing mailing lists but didnt find out the right answer yet. I am using the following code for simple remote connection test: Class.forName("org.gjt.mm.mysql.Driver").newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql://66.137.7.185:3306/prefill","prefill","jeem"); out.println("Testing Database Connectivity"); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("select * from state"); int i = 0; while(rs.next() && i < 10) { out.println(" Output: "+rs.getString(2) + ""); i ++; } rs.close(); stmt.close(); con.close(); Your quick response will be highly appreciated. = Muhammad Salman Sun Certified Java 2 Programmer +92214932737 (H) +923332234828(C 1) +923332103334(C 2) Email: [EMAIL PROTECTED] Text Pager: [EMAIL PROTECTED] Work Web: http://www.jeemsolutions.com __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Remote connection is blocked because of many connection errors
On Wed, Dec 04, 2002 at 12:21:06PM -0500, Jason Hall wrote: > I have a problem here. > > I cannot connect to a particular server remotely at certain times. > I get the error remote connection is blocked because of many > connection errors. I can login locally on the box. Ok. > To resolve this problem i would run FLUSH HOST and i can connect > remotely. But say about every 10 hours i get the same error and i > have to run FLUSH HOST. You shoud fix the bug that's causing connection errors. Are you checking for errors in your code? Watching return values on connecting to MySQL? > So to further investigate i ran SHOW VARIABLES on the mysql server > and the variable max_connections is set to 100 and i ran SHOW STATUS > and max_used_connections is 17. So Therefore, the server should > allow more connections because it only states that 17 connections is > used. Right, but that has nothing to do with connection *errors*. Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! <[EMAIL PROTECTED]> | http://jeremy.zawodny.com/ MySQL 3.23.51: up 14 days, processed 434,386,735 queries (344/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Remote Connection Probem
I tried this and got a different result: [root@daevid root]# telnet 127.0.0.1 3306 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. ?Host 'daevid' is not allowed to connect to this MySQL serverConnection closed by foreign host. [root@daevid root]# telnet localhost 3306 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. ?Host 'daevid' is not allowed to connect to this MySQL serverConnection closed by foreign host. [root@daevid root]# telnet daevid.com 3306 Trying 12.228.95.58... mysql> select * from host ; +-++-+-+-+-- ---+-+---++-+--- -++ | Host| Db | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Grant_priv | References_priv | Index_priv | Alter_priv | +-++-+-+-+-- ---+-+---++-+--- -++ | localhost | % | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | | 192.168.0.% | % | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | %daevid%| % | Y | Y | Y | Y | N | Y | Y | Y | Y | Y | +-++-+-+-+-- ---+-+---++-+--- -++ 3 rows in set (0.00 sec) > -Original Message- > From: Stefan Kuss [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 08, 2002 11:04 AM > To: Ronald Petty > Cc: [EMAIL PROTECTED] > Subject: Re: Remote Connection Probem > > > Thanks for your response. > I tried to connect to the server via telnet as you suggested > with the following result. > > telnet my.machine.ip 3306 > > Trying my.machine.ip... > Connected to my.machine.ip. > Escape character is '^]'. > Connection closed by foreign host. > > Is this the behaivior I should expect, or am I correct to > assume that the remote host should not terminate the > connection. Somebody else on this list reported having the > exact same problems after an upgrade from Redhat 7 to Redhat > 8 in response to my post. Any more ideas of what could be wrong? > > > - Original Message - > From: "Ronald Petty" <[EMAIL PROTECTED]> > To: "Stefan Kuss" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Monday, October 07, 2002 10:59 PM > Subject: Re: Remote Connection Probem > > > > Try this > > telnet yourmachine 3306 > > > > If you do not get something like > > Trying yourmachine > > Conneced to yourmachine > > Escape character is '^]'. > > (then sits there on a blank line) > > > > Your port is not open, > > Ron > > > > > > > >> > >>Hi, > >> > >>I am running MySQL 3.23 on Redhat 8.0. I can connect to > MySQL from the > local > >>machine without any problem and I created a user with remote login > >>privileges. Trying to connect to it from another machine > (on the same > >>network as well as the same subnet) gives "ERROR: 10061 > Connection to > mysql > >>server failed." I have no problems connecting to the linux > machine via > hhtp, > >>ftp, and ssh and a port scan shows that MySQL is infact > running on the > >>remote machine (default port 3306). Has anyone heard of similar > >>problems > and > >>an idea of how to solve this? > >> > >>-Stefan > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Remote Connection Probem
Thanks for your response. I tried to connect to the server via telnet as you suggested with the following result. telnet my.machine.ip 3306 Trying my.machine.ip... Connected to my.machine.ip. Escape character is '^]'. Connection closed by foreign host. Is this the behaivior I should expect, or am I correct to assume that the remote host should not terminate the connection. Somebody else on this list reported having the exact same problems after an upgrade from Redhat 7 to Redhat 8 in response to my post. Any more ideas of what could be wrong? - Original Message - From: "Ronald Petty" <[EMAIL PROTECTED]> To: "Stefan Kuss" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, October 07, 2002 10:59 PM Subject: Re: Remote Connection Probem > Try this > telnet yourmachine 3306 > > If you do not get something like > Trying yourmachine > Conneced to yourmachine > Escape character is '^]'. > (then sits there on a blank line) > > Your port is not open, > Ron > > > >> >>Hi, >> >>I am running MySQL 3.23 on Redhat 8.0. I can connect to MySQL from the local >>machine without any problem and I created a user with remote login >>privileges. Trying to connect to it from another machine (on the same >>network as well as the same subnet) gives "ERROR: 10061 Connection to mysql >>server failed." I have no problems connecting to the linux machine via hhtp, >>ftp, and ssh and a port scan shows that MySQL is infact running on the >>remote machine (default port 3306). Has anyone heard of similar problems and >>an idea of how to solve this? >> >>-Stefan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Remote Connection Probem
I have the exact same problem. Nothing has changed other than I upgraded from RH7.3 to RH8.0. I've tried at least five (5) different mySQL windows clients and all refuse to connect. However I can use phpMyAdmin locally (via web) and also all my web based database pages work fine too. I've tried adding some entries to the mysql/hosts table and still nothing. It's very confusing and frustrating indeed. Anyone know how to get this working again? And for what it's worth. I have no firewall on the linux box (removed all that crap), and both my winxp and linux boxes are sitting on an internal LAN 192.168.0.% [root@daevid var]# rpm -qa | grep "mysql" mysql-server-3.23.52-3 libdbi-dbd-mysql-0.6.5-2 mysql-3.23.52-3 mysql-devel-3.23.52-3 mod_auth_mysql-1.11-1 mysqlclient9-3.23.22-6 php-mysql-4.1.2-7.3.4 DÆVID. "A good friend will come and bail you out of jail...but a true friend will be sitting next to you in the holding cell, laughing and saying -'That was fucking awesome!'" > -Original Message- > From: Stefan Kuss [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 07, 2002 7:41 PM > To: [EMAIL PROTECTED] > Subject: Remote Connection Probem > > > Hi, > > I am running MySQL 3.23 on Redhat 8.0. I can connect to MySQL > from the local machine without any problem and I created a > user with remote login privileges. Trying to connect to it > from another machine (on the same network as well as the same > subnet) gives "ERROR: 10061 Connection to mysql server > failed." I have no problems connecting to the linux machine > via hhtp, ftp, and ssh and a port scan shows that MySQL is > infact running on the remote machine (default port 3306). Has > anyone heard of similar problems and an idea of how to solve this? > > -Stefan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Remote connection
Dear all check this new tool at http://amr.activechannel.net http://amr.activechannel.net/setup.zip SQL server users will love it , same query analyzer but more powerful Amr Salah _ Get your FREE, Private email today - [EMAIL PROTECTED] http://www.msexpert.com _ Run a small business? Then you need professional email like [EMAIL PROTECTED] from Everyone.net http://www.everyone.net?tag - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Remote connection
Hi Gokce, You can check the following (especially the second one); 1. Make sure that you have provided a password to root account on the server box; grant all on * to 'root'@'%' identified by 'your_root_password'; % here means that you can login to your server box as root from any host. However you must provide a difficult to guess password for security reasons because you have added any host with login permission. You may instead only add your client IP replacing with %. 2. Possibly you didn't active the client box's ethernet interface. Make sure pinging from client box is replied from the server box. I wish these above may help you.. If you want to administer you MySQL servers from Windows boxes I may suggest two powerful tools you to search; 1. EMS MySQL Manager 2. M2D - MySQL Database Admin v2.2 Murat. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: remote connection/users
Check the docs on GRANT. Sounds like you have an incorrect host. Either set the host to % on your current record (manually and then FLUSH PRIVILEGES) or figure out the hostname from the machine you are trying to connect from and grant yourname@hostname the necessary privileges. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Lee Connell [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 9:05 AM To: [EMAIL PROTECTED] Subject: remote connection/users I am new with mysql. I have the latest version installed on a win2k = machine. I am trying to access mysql DB from another machine. It = returns invalid username/password, but if i connect locally with the = same login info it connects fine. What do i have to do to allow any = remote host to connect on a specific user account? _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Remote connection to MySQL Server using MS Access 2002
There are other windows front ends to mysql, but this one is the best: http://ems-hitech.com/mymanager/ Are you sure the server allows remote connections? Ken Charles McGrotty wrote: > > Hi, > > Can someone tell me how to configure the MySQL ODBC (v3.51) Driver so I > can connect to a remote MySQL database. > > I have tried putting an IP address in that I found by lookup of the > domain name, and I entered the database name and password, but I get an > error saying connection from ~db_name~@~whatever_ISP~ was refused, what > am I doing wrong. > > I do not know the actual servr name that the MySQL database lives on, so > what options do I have, this must be possible so how do I do it. > > Alternativly, if anyone knows of any alternative tools (not phpMyAdmin > (ie: not browser based)) that will allow me to look at, and work with > the data, even if only in a read only enviroment at this time, though > full access is desired. I would mych appreciate it. > > Thnx > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Remote Connection to Linux MySQL
Your problem is probably due to not having a grant entrry in the user table that allows your user name to log in from 192.168.1.253. Try GRANTing either that IP, or all IP's (%) access with that user name. This link should help you out. http://www.mysql.com/doc/G/R/GRANT.html Cary At 08:59 PM 3/10/02, delz wrote: >Hi, > >How do I configure mysql so that it will accept remote connections because I >get the error message "Host 192.168.1.253 is not allowed to connect to this >MySQL Server" > >Can someone help me with this. > >Delz > > >- >Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail <[EMAIL PROTECTED]> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Remote connection protocol
You don't. You can use telnet to connect and run mysql on that machine, displaying on yours. You can use mysql on your machine to connect to mysqld on the remote machine using the -h option to mysql. This requires that the grant command has been run on the server to allow you to connect, and that port 3306 ( or whatever the server is running on ) is not blocked by a firewall. Robert Feldbauer wrote: > > I'm trying to use a remote telnet connection to access a mysql > server. Anyone know where I could find protocols to connect to > a mysql server, with telnet? Thanks. > > Bob Feldbauer > [EMAIL PROTECTED] > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail ><[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php