RE: MySql Error Number 1130
Interesting. I have never heard of that option. LX09:/home/rduz/backup # mysql -p -h. --port=3307 Enter password: ERROR 2005 (HY000): Unknown MySQL server host '.' (1) Perhaps it no longer functions? Thanks. Regards, Rich > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: MySql Error Number 1130
--- "Duzenbury, Rich" <[EMAIL PROTECTED]> wrote: > > > > -Original Message- > > From: Barry [mailto:[EMAIL PROTECTED] > > Sent: Thursday, April 13, 2006 9:41 AM > > To: mysql@lists.mysql.com > > Subject: Re: MySql Error Number 1130 > > > > Duzenbury, Rich wrote: > > >>localhost means socket. > > > > > > > > > Hmm, I don't believe it does. localhost is a DNS shortcut > > to the IP > > > address of the local machine. > > > > > > If that is how mysql wants to treat things, then it should issue > an > > > error message on connect because --host=localhost and > > --port=anything > > > would then be mutually exclusive. > > > > > > Thanks. > > > > > > Regards, > > > Rich > > > > Wasn't it something like on local machines MySQL doesn't open > > a socket port because it works directly in program and not > > going the loop out of mysql and back in through the socket? > > > > I'm not sure I understand your statement. It's wise to use a unix > domain socket where possible because they perform better than network > sockets. However, it's misleading for the mysql client to ignore a > command line directive as important as --port or --host without > warning. > Especially since this can cause connection to the wrong instance. > > Another way this would have been made more obvious is if the welcome > message in the client were a bit more descriptive. Currently, I see > 'Your mysql connection id is 2 to server version: > 5.0.18-standard-log'. > Perhaps the client should indicate the socket or ip/port that was > actually used in the welcome message. > > Thanks. > > Regards, > Rich > I couldn't find it with a quick trip through the docs but I seem to remember that using a single period for your host name will force an election to either use the socket or use the IP stack. I'm sorry but I don't remember which way it forces the client to connect but I do know it's only for local connections. shell>mysql -u -p -h. -P3307 HTH! Shawn Green Database Administrator Unimin Corporation - Spruce Pine __ 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: MySql Error Number 1130
> -Original Message- > From: Barry [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 13, 2006 9:41 AM > To: mysql@lists.mysql.com > Subject: Re: MySql Error Number 1130 > > Duzenbury, Rich wrote: > >>localhost means socket. > > > > > > Hmm, I don't believe it does. localhost is a DNS shortcut > to the IP > > address of the local machine. > > > > If that is how mysql wants to treat things, then it should issue an > > error message on connect because --host=localhost and > --port=anything > > would then be mutually exclusive. > > > > Thanks. > > > > Regards, > > Rich > > Wasn't it something like on local machines MySQL doesn't open > a socket port because it works directly in program and not > going the loop out of mysql and back in through the socket? > I'm not sure I understand your statement. It's wise to use a unix domain socket where possible because they perform better than network sockets. However, it's misleading for the mysql client to ignore a command line directive as important as --port or --host without warning. Especially since this can cause connection to the wrong instance. Another way this would have been made more obvious is if the welcome message in the client were a bit more descriptive. Currently, I see 'Your mysql connection id is 2 to server version: 5.0.18-standard-log'. Perhaps the client should indicate the socket or ip/port that was actually used in the welcome message. Thanks. Regards, Rich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySql Error Number 1130
Duzenbury, Rich wrote: localhost means socket. Hmm, I don't believe it does. localhost is a DNS shortcut to the IP address of the local machine. If that is how mysql wants to treat things, then it should issue an error message on connect because --host=localhost and --port=anything would then be mutually exclusive. Thanks. Regards, Rich Wasn't it something like on local machines MySQL doesn't open a socket port because it works directly in program and not going the loop out of mysql and back in through the socket? -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: MySql Error Number 1130
> localhost means socket. Hmm, I don't believe it does. localhost is a DNS shortcut to the IP address of the local machine. If that is how mysql wants to treat things, then it should issue an error message on connect because --host=localhost and --port=anything would then be mutually exclusive. Thanks. Regards, Rich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySql Error Number 1130
Duzenbury, Rich wrote: Wow, I found the problem! I think this may be a bug. In my case, I've got three instances running on ports 3306, 3307, and 3320. On the local machine, I connect to them via mysql -p --port-3306 --host=localhost mysql -p --port-3307 --host=localhost mysql -p --port-3320 --host=localhost Except that connecting to port 3307 doesn't really happen. It seems that the command line client connects to the main instance via the default socket when the host is not specified, or is the value localhost. So, even though I've specified the host and port, I wind up connecting to the main instance. I found this out by stopping the main instance on 3306, and then I issue: LX09:/etc # mysql --port=3307 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib /mysql/mysql.sock' (2) LX09:/etc # mysql --port=3307 --host=localhost ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib /mysql/mysql.sock' (2) localhost means socket. LX09:/etc # mysql --port=3307 --host=127.0.0.1 -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. LX09:/etc # mysql --port=3307 --host=nnn.nnn.nnn.nnn -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Note that /var/lib/mysql/mysql.sock is the socket associated with the main instance, not the alternates. It seems that if I *specify* a port, then mysql ought to use that port. It only seems to be an issue when not specifying a --host, or when using the value 'localhost'. It's a bit terrifying because during all my testing, I am thinking I am connected to the correct instance, when in fact, I was not. It will be very easy to blow away the main instance data by mistake. Can I somehow convince the mysql command line client to use the specified parms, rather than the (incorrect) socket All of the above is the correct and documented behavior. This is covered in the manual, and can be found many times in the archives. Thank you. Regards, Rich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: MySql Error Number 1130
Wow, I found the problem! I think this may be a bug. In my case, I've got three instances running on ports 3306, 3307, and 3320. On the local machine, I connect to them via mysql -p --port-3306 --host=localhost mysql -p --port-3307 --host=localhost mysql -p --port-3320 --host=localhost Except that connecting to port 3307 doesn't really happen. It seems that the command line client connects to the main instance via the default socket when the host is not specified, or is the value localhost. So, even though I've specified the host and port, I wind up connecting to the main instance. I found this out by stopping the main instance on 3306, and then I issue: LX09:/etc # mysql --port=3307 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib /mysql/mysql.sock' (2) LX09:/etc # mysql --port=3307 --host=localhost ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib /mysql/mysql.sock' (2) LX09:/etc # mysql --port=3307 --host=127.0.0.1 -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. LX09:/etc # mysql --port=3307 --host=nnn.nnn.nnn.nnn -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Note that /var/lib/mysql/mysql.sock is the socket associated with the main instance, not the alternates. It seems that if I *specify* a port, then mysql ought to use that port. It only seems to be an issue when not specifying a --host, or when using the value 'localhost'. It's a bit terrifying because during all my testing, I am thinking I am connected to the correct instance, when in fact, I was not. It will be very easy to blow away the main instance data by mistake. Can I somehow convince the mysql command line client to use the specified parms, rather than the (incorrect) socket? Thank you. Regards, Rich > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 12, 2006 6:00 PM > To: mysql@lists.mysql.com > Subject: Re: MySql Error Number 1130 > > When you are trying to connect to port 3307, for example, are > you specifying that port from your remote machine? Or are you > connecting to the mysqld listening on port 3306? > > You could try shutting down the server listening on port > 3306, and then connecting to port 3307. See if the error > message changes or goes away. > > shell># mysql -h host_name -u root -px --port=3307 > > I think you may need to specify the absolute IP address in > the user table, instead of a wildcard '%'. > > See if this helps. Use your root username and password in > place of 'tommy'. I did not want to mess up my root user > account! Use the IP address of your remote machine you want > to connect to mysql with, in place of 10.0.0.5. > > mysql> create user 'tommy'@'10.0.0.5' > -> identified by '12345'; > Query OK, 0 rows affected (0.00 sec) > > mysql> grant all on *.* > -> to 'tommy'@'10.0.0.5' > -> identified by '12345'; > Query OK, 0 rows affected (0.00 sec) > > mysql> select * from user where user = 'tommy' \G > ** 1. row * > Host: 10.0.0.5 > User: tommy > Password: snipped > Select_priv: Y > Insert_priv: Y > Update_priv: Y > Delete_priv: Y > Create_priv: Y > Drop_priv: Y > Reload_priv: Y > Shutdown_priv: Y > Process_priv: Y > File_priv: Y >Grant_priv: N > References_priv: Y >Index_priv: Y >Alter_priv: Y > Show_db_priv: Y >Super_priv: Y > Create_tmp_table_priv: Y > Lock_tables_priv: Y > Execute_priv: Y > Repl_slave_priv: Y > Repl_client_priv: Y > Create_view_priv: Y >Show_view_priv: Y > Create_routine_priv: Y >Alter_routine_priv: Y > Create_user_priv: Y > ssl_type: >ssl_cipher: > x509_issuer: > x509_subject: > max_questions: 0 > max_updates: 0 > max_connections: 0 > max_user_connections: 0 > 1 row in set (0.00 sec) > > HTH > > Keith > > In theory, theory and practice are the same; in practice they are not. > > On Wed, 12 Apr 2006, Duzenbury, Rich wrote: > > > To: mysql@lists.mysql.com > > From: "Duzenbury, Rich" <[EMAIL PROTECTED]> > > Subject: MySql Error Number 1130 > > > > Hi all, > > > > I am setting up two additional instances of mysql on my > mysq
Re: MySql Error Number 1130
When you are trying to connect to port 3307, for example, are you specifying that port from your remote machine? Or are you connecting to the mysqld listening on port 3306? You could try shutting down the server listening on port 3306, and then connecting to port 3307. See if the error message changes or goes away. shell># mysql -h host_name -u root -px --port=3307 I think you may need to specify the absolute IP address in the user table, instead of a wildcard '%'. See if this helps. Use your root username and password in place of 'tommy'. I did not want to mess up my root user account! Use the IP address of your remote machine you want to connect to mysql with, in place of 10.0.0.5. mysql> create user 'tommy'@'10.0.0.5' -> identified by '12345'; Query OK, 0 rows affected (0.00 sec) mysql> grant all on *.* -> to 'tommy'@'10.0.0.5' -> identified by '12345'; Query OK, 0 rows affected (0.00 sec) mysql> select * from user where user = 'tommy' \G ** 1. row * Host: 10.0.0.5 User: tommy Password: snipped Select_priv: Y Insert_priv: Y Update_priv: Y Delete_priv: Y Create_priv: Y Drop_priv: Y Reload_priv: Y Shutdown_priv: Y Process_priv: Y File_priv: Y Grant_priv: N References_priv: Y Index_priv: Y Alter_priv: Y Show_db_priv: Y Super_priv: Y Create_tmp_table_priv: Y Lock_tables_priv: Y Execute_priv: Y Repl_slave_priv: Y Repl_client_priv: Y Create_view_priv: Y Show_view_priv: Y Create_routine_priv: Y Alter_routine_priv: Y Create_user_priv: Y ssl_type: ssl_cipher: x509_issuer: x509_subject: max_questions: 0 max_updates: 0 max_connections: 0 max_user_connections: 0 1 row in set (0.00 sec) HTH Keith In theory, theory and practice are the same; in practice they are not. On Wed, 12 Apr 2006, Duzenbury, Rich wrote: > To: mysql@lists.mysql.com > From: "Duzenbury, Rich" <[EMAIL PROTECTED]> > Subject: MySql Error Number 1130 > > Hi all, > > I am setting up two additional instances of mysql on my mysql server, > which is running version 5.0.18-standard-log. > > I've got the additional instances set up, and they are running. I can > see that they are bound to the proper ports. > > I can connect to them locally like > mysql -p --port=3306 > mysql -p --port=3307 > mysql -p --port=3320 > > I have always been able to connect remotely from my workstation to the > base server on 3306. > > My problem is that I cannot connect remotely to either of the new > additional instances running on 3307 or 3320. Anytime I attempt to do > so, I receive MySQL Error Number 1130, Host 'nnn.nnn.nnn.nnn' is not > allowed to connect to this MySQL server. > > I've been googling and reading manuals all day, and haven't made a dent. > > > User Table > *** 1. row *** > Host: % > User: root > Password: (redacted) > Select_priv: Y > Insert_priv: Y > Update_priv: Y > Delete_priv: Y > Create_priv: Y > Drop_priv: Y > Reload_priv: Y > Shutdown_priv: Y > Process_priv: Y > File_priv: Y >Grant_priv: Y > References_priv: Y >Index_priv: Y >Alter_priv: Y > Show_db_priv: Y >Super_priv: Y > Create_tmp_table_priv: Y > Lock_tables_priv: Y > Execute_priv: Y > Repl_slave_priv: Y > Repl_client_priv: Y > ssl_type: >ssl_cipher: > x509_issuer: > x509_subject: > max_questions: 0 > max_updates: 0 > max_connections: 0 > *** 2. row *** > Host: localhost > User: root > Password: (redacted) > Select_priv: Y > Insert_priv: Y > Update_priv: Y > Delete_priv: Y > Create_priv: Y > Drop_priv: Y > Reload_priv: Y > Shutdown_priv: Y > Process_priv: Y > File_priv: Y >Grant_priv: Y > References_priv: Y >Index_priv: Y >Alter_priv: Y > Show_db_priv: Y >Super_priv: Y > Create_tmp_table_priv: Y > Lock_tables_priv: Y > Execute_priv: Y > Repl_slave_priv: Y > Repl_client_priv: Y > ssl_type: >ssl_cipher: > x509_issuer: > x509_subject: > max_questions: 0 > max_updates: 0 > max_connections: 0 > > > db Table: > *** 1. row *** > Host: % >