RE: localhost vs domain for connection string
>-Original Message- >From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De >Meersman >Sent: Thursday, November 25, 2010 3:29 AM >To: Jerry Schwartz >Cc: Brent Clark; mysql mailing list >Subject: Re: localhost vs domain for connection string > >On Wed, Nov 24, 2010 at 4:44 PM, Jerry Schwartz wrote: > >> [JS] This might or might not be enabled by default. I'm running on Windows, >> and I seem to remember having to change it. >> >> # Enable named pipe, bypassing the network stack >> enable-named-pipe >> > >Windows' named pipes are not the same as unix sockets, although the general >idea is similar. I'm not sure, but I think the Unix socket file is always >created. > [JS] I don't remember either. I also don't remember if the original question was about *nix or Windows. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 E-mail: je...@gii.co.jp Web site: www.the-infoshop.com >-- >Bier met grenadyn >Is als mosterd by den wyn >Sy die't drinkt, is eene kwezel >Hy die't drinkt, is ras een ezel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: localhost vs domain for connection string
On Wed, Nov 24, 2010 at 4:44 PM, Jerry Schwartz wrote: > [JS] This might or might not be enabled by default. I'm running on Windows, > and I seem to remember having to change it. > > # Enable named pipe, bypassing the network stack > enable-named-pipe > Windows' named pipes are not the same as unix sockets, although the general idea is similar. I'm not sure, but I think the Unix socket file is always created. -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een ezel
RE: localhost vs domain for connection string
>-Original Message- >From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De >Meersman >Sent: Wednesday, November 24, 2010 2:39 AM >To: Jerry Schwartz >Cc: Brent Clark; mysql mailing list >Subject: Re: localhost vs domain for connection string > >On Tue, Nov 23, 2010 at 7:55 PM, Jerry Schwartz wrote: > >> >IIRC, "localhost" is seen by the client as a magic word to mean "use the >> >UNIX socket, not 127.0.0.1". >> > >> [JS] IF it is enabled in my.cnf. >> >Hmm, didn't know that bit. What's the option called ? > [JS] This might or might not be enabled by default. I'm running on Windows, and I seem to remember having to change it. # SERVER SECTION # -- # # The following options will be read by the MySQL Server. Make sure that # you have installed the server correctly (see above) so it reads this # file. # [mysqld] # The TCP/IP Port the MySQL Server will listen on port=3306 # Enable named pipe, bypassing the network stack enable-named-pipe = Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 E-mail: je...@gii.co.jp Web site: www.the-infoshop.com >-- >Bier met grenadyn >Is als mosterd by den wyn >Sy die't drinkt, is eene kwezel >Hy die't drinkt, is ras een ezel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: localhost vs domain for connection string
On Tue, Nov 23, 2010 at 7:55 PM, Jerry Schwartz wrote: > >IIRC, "localhost" is seen by the client as a magic word to mean "use the > >UNIX socket, not 127.0.0.1". > > > [JS] IF it is enabled in my.cnf. > Hmm, didn't know that bit. What's the option called ? -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een ezel
RE: localhost vs domain for connection string
>-Original Message- >From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De >Meersman >Sent: Tuesday, November 23, 2010 6:19 AM >To: Brent Clark >Cc: mysql mailing list >Subject: Re: localhost vs domain for connection string > >IIRC, "localhost" is seen by the client as a magic word to mean "use the >UNIX socket, not 127.0.0.1". > [JS] IF it is enabled in my.cnf. >So, yes, that would make the connection not show up in netstat :-) > >On Tue, Nov 23, 2010 at 11:11 AM, Brent Clark >wrote: > >> Hiya >> >> Is there a difference if someone had to make the connection string the a >> domain (hosts file entry makes the machine look at its ip) as opposed to >> just using localhost. >> If so would a performance hit be incurred? >> >> I have this client that has used the domain and in netstat im seeing all >> this >> >> tcp0 0 own.ex.ip:50340 own.ex.ip:3306 ESTABLISHED >> 30324/apache2 >> tcp0 0 own.ex.ip:50287 own.ex.ip:3306 ESTABLISHED >> 30309/apache2 >> tcp0 0 own.ex.ip:3306 own.ex.ip:50287 ESTABLISHED >> 29234/mysqld >> tcp0 0 own.ex.ip:50357 own.ex.ip:3306 ESTABLISHED >> 31714/apache2 >> tcp0 0 own.ex.ip:3306 own.ex.ip:50335 ESTABLISHED >> 29234/mysqld >> >> But I have another client that is using localhost and netstat is quiet as a >> mouse. >> >> This actually never dawned on me. Hence the reason im asking >> But the real reason is that the first clients machine is under heavy load >> and we are trying to see what can be improved. >> >> Kind Regards >> Brent Clark >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe:http://lists.mysql.com/mysql?unsub=vegiv...@tuxera.be >> >> > > >-- >Bier met grenadyn >Is als mosterd by den wyn >Sy die't drinkt, is eene kwezel >Hy die't drinkt, is ras een ezel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: localhost vs domain for connection string
> From: Brent Clark > > Is there a difference if someone had to make the connection string the a > domain (hosts file entry makes the machine look at its ip) as opposed to just > using localhost. > If so would a performance hit be incurred? Using 'localhost' will always be faster, although perhaps imperceptibly so. I look into the future because that’s where I am going to spend the rest of my life. -- George Burns Jan Steinman, EcoReality Co-op -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: localhost vs domain for connection string
IIRC, "localhost" is seen by the client as a magic word to mean "use the UNIX socket, not 127.0.0.1". So, yes, that would make the connection not show up in netstat :-) On Tue, Nov 23, 2010 at 11:11 AM, Brent Clark wrote: > Hiya > > Is there a difference if someone had to make the connection string the a > domain (hosts file entry makes the machine look at its ip) as opposed to > just using localhost. > If so would a performance hit be incurred? > > I have this client that has used the domain and in netstat im seeing all > this > > tcp0 0 own.ex.ip:50340 own.ex.ip:3306 ESTABLISHED > 30324/apache2 > tcp0 0 own.ex.ip:50287 own.ex.ip:3306 ESTABLISHED > 30309/apache2 > tcp0 0 own.ex.ip:3306 own.ex.ip:50287 ESTABLISHED > 29234/mysqld > tcp0 0 own.ex.ip:50357 own.ex.ip:3306 ESTABLISHED > 31714/apache2 > tcp0 0 own.ex.ip:3306 own.ex.ip:50335 ESTABLISHED > 29234/mysqld > > But I have another client that is using localhost and netstat is quiet as a > mouse. > > This actually never dawned on me. Hence the reason im asking > But the real reason is that the first clients machine is under heavy load > and we are trying to see what can be improved. > > Kind Regards > Brent Clark > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql?unsub=vegiv...@tuxera.be > > -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een ezel
localhost vs domain for connection string
Hiya Is there a difference if someone had to make the connection string the a domain (hosts file entry makes the machine look at its ip) as opposed to just using localhost. If so would a performance hit be incurred? I have this client that has used the domain and in netstat im seeing all this tcp0 0 own.ex.ip:50340 own.ex.ip:3306 ESTABLISHED 30324/apache2 tcp0 0 own.ex.ip:50287 own.ex.ip:3306 ESTABLISHED 30309/apache2 tcp0 0 own.ex.ip:3306 own.ex.ip:50287 ESTABLISHED 29234/mysqld tcp0 0 own.ex.ip:50357 own.ex.ip:3306 ESTABLISHED 31714/apache2 tcp0 0 own.ex.ip:3306 own.ex.ip:50335 ESTABLISHED 29234/mysqld But I have another client that is using localhost and netstat is quiet as a mouse. This actually never dawned on me. Hence the reason im asking But the real reason is that the first clients machine is under heavy load and we are trying to see what can be improved. Kind Regards Brent Clark -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: MYSQL Connection String error
You need to grant privileges to 'root'@'127.0.0.1' because it is not the same thing as 'root'@'localhost'. Timotius Alfa wrote: Pls help me, I want to know if this connection string can be used for multi user, coz when I change "Server=localhost" with "server=127.0.0.1" it can not work. thanks Connect_Str = "Driver={MySQL ODBC 3.51 Driver};" & _ "SERVER=127.0.0.1;" & _ "Database=sekolah;" & _ "UID=root;PWD=tim; OPTION= " & 1 + 2 + 8 + 32 + 2048 + 16384 - Do you Yahoo!? The New Yahoo! Shopping - with improved product search -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MYSQL Connection String error
Pls help me, I want to know if this connection string can be used for multi user, coz when I change "Server=localhost" with "server=127.0.0.1" it can not work. thanks Connect_Str = "Driver={MySQL ODBC 3.51 Driver};" & _ "SERVER=127.0.0.1;" & _ "Database=sekolah;" & _ "UID=root;PWD=tim; OPTION= " & 1 + 2 + 8 + 32 + 2048 + 16384 - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
RE: Connection String?
Mike, I'm curious, is the value specified for the DRIVER argument the name of the ODBC driver? If so, is this a general trick that can be applied to ADO for use with other ODBC drivers, i.e. PostgreSQL? Thanks, -- Barry C. Hawkins Systems Consultant All Things Computed [EMAIL PROTECTED] 404-795-9147 voice/fax Quoting Mike Hillyer <[EMAIL PROTECTED]>: > On the contrary, I use MyODBC and NEVER use a DSN, hate the things. > > Here is the connection string I use: > > DRIVER={MySQL ODBC 3.51 > Driver};SERVER=123.456.789.100;DATABASE=mysqldatabase;UID=sampleuser;PWD=123 > 45; OPTION=16427 > > > It works great, sometimes I add 2048 to the options value to use the > compressed protocol(producing OPTION=18475), it is especially useful when > dealing with blobs. > > Mike Hillyer > http://www.dynamergy.com/mike > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Friday, March 14, 2003 8:43 AM > To: Tamayo, Nelson > Cc: '[EMAIL PROTECTED]' > Subject: Re: Connection String? > > > Quoting "Tamayo, Nelson" <[EMAIL PROTECTED]>: > > > I am trying to connect to MySQL without using a DSN entry, this is my > > connection string > > > > DRIVER={MySQL ODBC 3.51 > > Driver};SRVR=159.113.44.49;DB=csapps;UID=user;PWD=password > > > > The error I get is > > > > "Invalid connection string attribute" > > > > Any ideas? > > > > > > Nelson Tamayo > > Claims Automation > > (800) 237-7767 x3520 > > [EMAIL PROTECTED] > > > > The information contained in this transmission is legally privileged and > > confidential information intended only for the use of the individual or > > entity named above. If the reader of this message is not the intended > > recipient, you are hereby notified that any dissemination, distribution, > or > > copy of this transmission is strictly prohibited. If you have received > this > > transmission in error, please contact the sender immediately. > > > > > > > > > > - > > 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 > > > > > > Nelson, > It sounds like you are trying to connect to MySQL via ADO using a > connection string. ADO connection in that manner requires an OLE-DB driver > for > the database platform if you wish to avoid using an ODBC DSN. I don't think > that there's an OLE-DB (at least not a free one) for MySQL yet. Therefore, > you > will have to use a DSN. > > Regards, > -- > Barry C. Hawkins > Systems Consultant > All Things Computed > [EMAIL PROTECTED] > 404-795-9147 voice/fax > > > > > - > 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 > > - 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: Connection String?
On the contrary, I use MyODBC and NEVER use a DSN, hate the things. Here is the connection string I use: DRIVER={MySQL ODBC 3.51 Driver};SERVER=123.456.789.100;DATABASE=mysqldatabase;UID=sampleuser;PWD=123 45; OPTION=16427 It works great, sometimes I add 2048 to the options value to use the compressed protocol(producing OPTION=18475), it is especially useful when dealing with blobs. Mike Hillyer http://www.dynamergy.com/mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 8:43 AM To: Tamayo, Nelson Cc: '[EMAIL PROTECTED]' Subject: Re: Connection String? Quoting "Tamayo, Nelson" <[EMAIL PROTECTED]>: > I am trying to connect to MySQL without using a DSN entry, this is my > connection string > > DRIVER={MySQL ODBC 3.51 > Driver};SRVR=159.113.44.49;DB=csapps;UID=user;PWD=password > > The error I get is > > "Invalid connection string attribute" > > Any ideas? > > > Nelson Tamayo > Claims Automation > (800) 237-7767 x3520 > [EMAIL PROTECTED] > > The information contained in this transmission is legally privileged and > confidential information intended only for the use of the individual or > entity named above. If the reader of this message is not the intended > recipient, you are hereby notified that any dissemination, distribution, or > copy of this transmission is strictly prohibited. If you have received this > transmission in error, please contact the sender immediately. > > > > > - > 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 > > Nelson, It sounds like you are trying to connect to MySQL via ADO using a connection string. ADO connection in that manner requires an OLE-DB driver for the database platform if you wish to avoid using an ODBC DSN. I don't think that there's an OLE-DB (at least not a free one) for MySQL yet. Therefore, you will have to use a DSN. Regards, -- Barry C. Hawkins Systems Consultant All Things Computed [EMAIL PROTECTED] 404-795-9147 voice/fax - 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: Connection String?
Quoting "Tamayo, Nelson" <[EMAIL PROTECTED]>: > I am trying to connect to MySQL without using a DSN entry, this is my > connection string > > DRIVER={MySQL ODBC 3.51 > Driver};SRVR=159.113.44.49;DB=csapps;UID=user;PWD=password > > The error I get is > > "Invalid connection string attribute" > > Any ideas? > > > Nelson Tamayo > Claims Automation > (800) 237-7767 x3520 > [EMAIL PROTECTED] > > The information contained in this transmission is legally privileged and > confidential information intended only for the use of the individual or > entity named above. If the reader of this message is not the intended > recipient, you are hereby notified that any dissemination, distribution, or > copy of this transmission is strictly prohibited. If you have received this > transmission in error, please contact the sender immediately. > > > > > - > 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 > > Nelson, It sounds like you are trying to connect to MySQL via ADO using a connection string. ADO connection in that manner requires an OLE-DB driver for the database platform if you wish to avoid using an ODBC DSN. I don't think that there's an OLE-DB (at least not a free one) for MySQL yet. Therefore, you will have to use a DSN. Regards, -- Barry C. Hawkins Systems Consultant All Things Computed [EMAIL PROTECTED] 404-795-9147 voice/fax - 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
Connection String?
I am trying to connect to MySQL without using a DSN entry, this is my connection string DRIVER={MySQL ODBC 3.51 Driver};SRVR=159.113.44.49;DB=csapps;UID=user;PWD=password The error I get is "Invalid connection string attribute" Any ideas? Nelson Tamayo Claims Automation (800) 237-7767 x3520 [EMAIL PROTECTED] The information contained in this transmission is legally privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copy of this transmission is strictly prohibited. If you have received this transmission in error, please contact the sender immediately. - 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
Help with mySQL Connection string
Hey folks - Here is hoping someone can help & once I get it down I promise I'll post all my work on this list so some other newbie can benefit. I'm simply trying to run a very very straightforward JDBC test with mySQL & I keep getting the "Server configuration denies access to data source" error. But before you tell me that I must simply look at what my mysql.db & mysql.user table allows - I'VE TRIED THAT. I realize that the error is probably there somewhere - but I can't see it. I've tried connecting with 2 different accounts - the provided "root" & a user I created "deep" to 2 different databases the provided "test" & "testdb" which I created) . Here is what mysql says about the two different databases mysql> select * from db; Host | Db | User |... -++--- | % | test| | .. | % | test\_% | | | localhost | testdb | deep | Note that "root" should have access to "test" & deep@localhost should have access to "testdb" right? So here are all the connection strings I have tried - all return the same error below Connection conn = DriverManager.getConnection( "jdbc:mysql://localhost:3306/test", "root", "mypass" //"jdbc:mysql://localhost:3306/testdb", "deep", "mypass" //"jdbc:mysql://localhost/testdb?user=deep&password=mypass" //"jdbc:mysql://localhost/testdb", "deep", "mypass" // "jdbc:mysql://localhost:3306/testdb?user=deep@localhost&password=mypass" //"jdbc:mysql://localhost:3306/testdb?user=deep&password=mypass" //"jdbc:mysql://localhost/testdb", "deep@localhost", "mypass" //"jdbc:mysql:///test", "root", "mypass" //"jdbc:mysql://localhost/test", "root@localhost", "mypass" ); My Error: Exception in thread "main" java.sql.SQLException: Server configuration denies access to data source at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:193) at org.gjt.mm.mysql.Connection.connectionInit(Connection.java:261) at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89) at org.gjt.mm.mysql.Driver.connect(Driver.java:167) at java.sql.DriverManager.getConnection(DriverManager.java:517) at java.sql.DriverManager.getConnection(DriverManager.java:199) at TestMySQL4.main(TestMySQL4.java:76) BTW: I am using MacOS 10.1 MySQL 3.23.42 The driver is: mm.mysql-2.0.6.jar Please help! 'deep -- Amandeep Jawa Worker Bee Software -- [EMAIL PROTECTED] 225A Dolores St. San Francisco, CA 94103-2202 Home: 415 255 6257 (ALL MALP) professional: http://www.worker-bee.com personal: http://www.deeptrouble.com political: http://www.sflcv.org - 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