Re: command mysql -u $user without typing it - getting shafted and annoyed now.
How did you add the users? If you inserted them into the user table, you are asking for trouble unless you understand exactly what you are doing. That is why the GRANT and REVOKE statements were added. Since you did not use 'identified by "somepassword"' I'm not sure if you set one, in which case the "-p" option would cause a failure. Also, even though the manual states that you don't need to FLUSH PRIVILEGES after using GRANT, I find that sometimes I do. Matthew Darcy wrote: >I must be going so wrong here. > >I deleted the users and started again. > >added 2 users > >dba and matt. Both of these have the host of % (connect from anything yes ?) > >I then do a > >grant all privileges on *.* to dba@"%" >flush privileges > >and > >grant all privileges on *.* to matt@"%" >flush privileges > > >then mysql -u matt -p >gives me ERROR 1045: Access denied for user: 'dba@localhost' (Using >password: YES) > >and I am on the local host ??? > >what the hell is going on I thougth I understood and was getting >somewhere. > >obviously not. > >Sorry to drag this up again. > >Matt. > > > > >-Original Message----- >From: Ho, Kam [mailto:[EMAIL PROTECTED]] >Sent: 09 January 2002 16:10 >To: '[EMAIL PROTECTED]'; Gerald Clark >Cc: MySql List >Subject: RE: command mysql -u $user without typing it > > >Try this: > >mysql> grant all privileges on *.* to test2@"localhost" > >also read manual about the grant command. > >-Original Message- >From: Matthew Darcy [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, January 09, 2002 11:04 AM >To: Gerald Clark >Cc: MySql List >Subject: RE: command mysql -u $user without typing it > > >I read similar notes on this in the manual, saying that invoking mysql >without the username will try to take the unix username if it exists in the >database. > >I tried this with test2, it opened an mysql session no problem, but when I >did a connect mysql it said "access is denyed for user @localhostto database >mysql" > >to me this looks like it is trying to connect with no user instead of >test2@localhost > >can you explain this ? > >Thanks, > >Matt. > > >-Original Message- >From: Gerald Clark [mailto:[EMAIL PROTECTED]] >Sent: 09 January 2002 15:56 >To: [EMAIL PROTECTED] >Cc: MySql List >Subject: Re: command mysql -u $user without typing it > > > > >Matthew Darcy wrote: > >>I have 3 UNIX users on my server. >> >>test1, test2, and test3. >> >>I have created 3 users for mysql test1, test2, and test3 (shock horror) >> >>If I want to connect to the database as root then I understand I must do >>mysql -u root -p >> >>but I would like test1 2 and 3 to be able to type mysql and be either >> >logged > >>in as their unix username, ie test2 types mysql and connects to the >> >database > >>as test2 (mysql account) >>or at least be prompted for the password for test2. >> >>The only way I can think of doing this is by setting up an alias ie >> >>alias mysql_connect=`mysql -u $username -p` >> >>there must be some sort of autologin from username like in oracle. >> >>Thanks, >> >>Matt. >> >The user defaults to the unix user. >You can put a .my.cnf file in their home directory with > >[client] >password=whatever > >to make it even easier. > > >- >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 > > - 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: command mysql -u $user without typing it - getting shafted and annoyed now.
mail seemed to come through out of sink in a strange order. I take it you got the message about grant not altering the db table. Thanks for the help. I leant a lot. Matt. -Original Message- From: Quentin Bennett [mailto:[EMAIL PROTECTED]] Sent: 10 January 2002 19:32 To: '[EMAIL PROTECTED]'; Ho Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it - getting shafted and annoyed now. Hi Again I just did this to check what you did: SKYROAD#mercury1:/mercury/home/quentin:mysql --user=mercury -p mysql Enter password: mysql> grant all privileges on mysql.* to matt@"%"; Query OK, 0 rows affected (0.05 sec) mysql> flush privileges; Query OK, 0 rows affected (0.19 sec) mysql> quit Bye SKYROAD#mercury1:/mercury/home/quentin:mysql --user=matt mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 353315 to server version: 3.23.40-log mysql> quit Bye SKYROAD#mercury1:/mercury/home/quentin:mysql --user=matt -p mysql Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 353316 to server version: 3.23.40-log mysql> quit Bye SKYROAD#mercury1:/mercury/home/quentin:mysql --user=matt -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 353317 to server version: 3.23.40-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> quit Bye As you can see, it all works fine - when prompted for a password, just pressing return lets me in. Can you post the results of: select user, name, host from user; It may help. Quentin -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Thursday, 10 January 2002 11:10 p.m. To: Ho Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it - getting shafted and annoyed now. I must be going so wrong here. I deleted the users and started again. added 2 users dba and matt. Both of these have the host of % (connect from anything yes ?) I then do a grant all privileges on *.* to dba@"%" flush privileges and grant all privileges on *.* to matt@"%" flush privileges then mysql -u matt -p gives me ERROR 1045: Access denied for user: 'dba@localhost' (Using password: YES) and I am on the local host ??? what the hell is going on I thougth I understood and was getting somewhere. obviously not. Sorry to drag this up again. Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 16:10 To: '[EMAIL PROTECTED]'; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it Try this: mysql> grant all privileges on *.* to test2@"localhost" also read manual about the grant command. -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:04 AM To: Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it I read similar notes on this in the manual, saying that invoking mysql without the username will try to take the unix username if it exists in the database. I tried this with test2, it opened an mysql session no problem, but when I did a connect mysql it said "access is denyed for user @localhostto database mysql" to me this looks like it is trying to connect with no user instead of test2@localhost can you explain this ? Thanks, Matt. -Original Message- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 15:56 To: [EMAIL PROTECTED] Cc: MySql List Subject: Re: command mysql -u $user without typing it Matthew Darcy wrote: > >I have 3 UNIX users on my server. > >test1, test2, and test3. > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > >If I want to connect to the database as root then I understand I must do >mysql -u root -p > >but I would like test1 2 and 3 to be able to type mysql and be either logged >in as their unix username, ie test2 types mysql and connects to the database >as test2 (mysql account) >or at least be prompted for the password for test2. > >The only way I can think of doing this is by setting up an alias ie > >alias mysql_connect=`mysql -u $username -p` > >there must be some sort of autologin from username like in oracle. > >Thanks, > >Matt. > The user defaults to the unix user. You can put a .my.cnf file in their home directory with [client] password=whatever to make it even easier. - 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 PROT
RE: command mysql -u $user without typing it - getting shafted and annoyed now.
Hi Again I just did this to check what you did: SKYROAD#mercury1:/mercury/home/quentin:mysql --user=mercury -p mysql Enter password: mysql> grant all privileges on mysql.* to matt@"%"; Query OK, 0 rows affected (0.05 sec) mysql> flush privileges; Query OK, 0 rows affected (0.19 sec) mysql> quit Bye SKYROAD#mercury1:/mercury/home/quentin:mysql --user=matt mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 353315 to server version: 3.23.40-log mysql> quit Bye SKYROAD#mercury1:/mercury/home/quentin:mysql --user=matt -p mysql Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 353316 to server version: 3.23.40-log mysql> quit Bye SKYROAD#mercury1:/mercury/home/quentin:mysql --user=matt -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 353317 to server version: 3.23.40-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> quit Bye As you can see, it all works fine - when prompted for a password, just pressing return lets me in. Can you post the results of: select user, name, host from user; It may help. Quentin -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Thursday, 10 January 2002 11:10 p.m. To: Ho Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it - getting shafted and annoyed now. I must be going so wrong here. I deleted the users and started again. added 2 users dba and matt. Both of these have the host of % (connect from anything yes ?) I then do a grant all privileges on *.* to dba@"%" flush privileges and grant all privileges on *.* to matt@"%" flush privileges then mysql -u matt -p gives me ERROR 1045: Access denied for user: 'dba@localhost' (Using password: YES) and I am on the local host ??? what the hell is going on I thougth I understood and was getting somewhere. obviously not. Sorry to drag this up again. Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 16:10 To: '[EMAIL PROTECTED]'; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it Try this: mysql> grant all privileges on *.* to test2@"localhost" also read manual about the grant command. -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:04 AM To: Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it I read similar notes on this in the manual, saying that invoking mysql without the username will try to take the unix username if it exists in the database. I tried this with test2, it opened an mysql session no problem, but when I did a connect mysql it said "access is denyed for user @localhostto database mysql" to me this looks like it is trying to connect with no user instead of test2@localhost can you explain this ? Thanks, Matt. -Original Message- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 15:56 To: [EMAIL PROTECTED] Cc: MySql List Subject: Re: command mysql -u $user without typing it Matthew Darcy wrote: > >I have 3 UNIX users on my server. > >test1, test2, and test3. > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > >If I want to connect to the database as root then I understand I must do >mysql -u root -p > >but I would like test1 2 and 3 to be able to type mysql and be either logged >in as their unix username, ie test2 types mysql and connects to the database >as test2 (mysql account) >or at least be prompted for the password for test2. > >The only way I can think of doing this is by setting up an alias ie > >alias mysql_connect=`mysql -u $username -p` > >there must be some sort of autologin from username like in oracle. > >Thanks, > >Matt. > The user defaults to the unix user. You can put a .my.cnf file in their home directory with [client] password=whatever to make it even easier. - 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:
RE: command mysql -u $user without typing it SORTED THANKS ALL !!!!
I had cleared down the user table, and had the correct entries, BUT I had not cleared down the DB tables, as I thought grant would do this. after clearing down the db table and then granting the privileges it worked. Sorry for the mistake on my part all but I have a better understanding of whats going on. I thank everyone for their time on this problem. one thing though, I am surprised that grant did not alter the db table ? does this surprise anyone else. Thanks, Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 10 January 2002 14:00 To: '[EMAIL PROTECTED]'; Carl Troein; [EMAIL PROTECTED] Subject: RE: command mysql -u $user without typing it Matt: Can you check and see if you have more than 1 entry for user in your user table? I wonder if there were more than 1 entry in the user table for user, MySQL might pick the first one which do not allow you to connect using user user. Kam -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 7:31 AM To: Carl Troein; [EMAIL PROTECTED] Subject: RE: command mysql -u $user without typing it Carl, great attempt, but that would be far to easy, I have removed the localhost entry and the jordan.no-dns.co.uk entry, the only place this remains is for root. dba and matt only have 1 entry, which is % so keep I am still in the dark -Original Message- From: Carl Troein [mailto:[EMAIL PROTECTED]] Sent: 10 January 2002 07:37 To: [EMAIL PROTECTED] Subject: Re: command mysql -u $user without typing it Matthew Darcy writes: > I was aware of the user table as a standard table. > > I did a select on it and it all looked fine. Loads of Y's and % for host > Yet this user still cannot connect. The only explaination is corruption. It sounds to me like you haven't removed the @localhost entry, but you want user@% to be matched when you connect from localhost. Could that be it? If so, section 4.2.8 is your (rather dull) friend. //C -- Carl Troein - Crdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: command mysql -u $user without typing it ????
Matt: Can you check and see if you have more than 1 entry for user in your user table? I wonder if there were more than 1 entry in the user table for user, MySQL might pick the first one which do not allow you to connect using user user. Kam -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 7:31 AM To: Carl Troein; [EMAIL PROTECTED] Subject: RE: command mysql -u $user without typing it Carl, great attempt, but that would be far to easy, I have removed the localhost entry and the jordan.no-dns.co.uk entry, the only place this remains is for root. dba and matt only have 1 entry, which is % so keep I am still in the dark -Original Message- From: Carl Troein [mailto:[EMAIL PROTECTED]] Sent: 10 January 2002 07:37 To: [EMAIL PROTECTED] Subject: Re: command mysql -u $user without typing it Matthew Darcy writes: > I was aware of the user table as a standard table. > > I did a select on it and it all looked fine. Loads of Y's and % for host > Yet this user still cannot connect. The only explaination is corruption. It sounds to me like you haven't removed the @localhost entry, but you want user@% to be matched when you connect from localhost. Could that be it? If so, section 4.2.8 is your (rather dull) friend. //C -- Carl Troein - Crdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: command mysql -u $user without typing it ????
Carl, great attempt, but that would be far to easy, I have removed the localhost entry and the jordan.no-dns.co.uk entry, the only place this remains is for root. dba and matt only have 1 entry, which is % so keep I am still in the dark -Original Message- From: Carl Troein [mailto:[EMAIL PROTECTED]] Sent: 10 January 2002 07:37 To: [EMAIL PROTECTED] Subject: Re: command mysql -u $user without typing it Matthew Darcy writes: > I was aware of the user table as a standard table. > > I did a select on it and it all looked fine. Loads of Y's and % for host > Yet this user still cannot connect. The only explaination is corruption. It sounds to me like you haven't removed the @localhost entry, but you want user@% to be matched when you connect from localhost. Could that be it? If so, section 4.2.8 is your (rather dull) friend. //C -- Carl Troein - Crdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: command mysql -u $user without typing it ????
Doug, I am running redhat linux 7.1. I have tried these commands, and re-read your mails for earlier, and I understand what these commands should be doing, and how the tables work for secuirty. I have done all that I should have done and I am still stuck. I have have made sure the linux box does not have any login - or network restrictions on and all ports are open, no deny/allow rules etc. all fine. I truley am stumpped. -Original Message- From: Doug Thompson [mailto:[EMAIL PROTECTED]] Sent: 10 January 2002 04:39 To: James Montebello; [EMAIL PROTECTED] Cc: Gerald Clark; Ho Kam; MySql List Subject: RE: command mysql -u $user without typing it Matt: I don't remember you saying what machine you're running mysql on. Try adding another copy of the same user only @localhost. My win32 installation requires that for a dos box. The hosting service I use doesn't seem to care as it almost seems to ignore the Host column. GRANT ALL PRIVILEGES ON *.* TO foo@localhost IDENTIFIED BY 'password' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO foo@"%" IDENTIFIED BY 'password' WITH GRANT OPTION; Good luck. Doug On Wed, 9 Jan 2002 20:38:46 -, Matthew Darcy wrote: >I was doing a flush privileges. > >but this was coming up with the same thing no rows affected which to me was >concerning. > >I have now got 1 user working but 1 user not. > >I am going to delete all users and start again with the users, as at the >start I was not doing flush privileges and I was also trying put hostnames >without DNS into the hosts field. I may have corrupted the user accounts in >some way. > >I'll keep you posted. > >Thanks for the help and the good explainations though. > >I am sure it will be a user error on my part if 1 user is working and >another 1 not. > >Cheers. > >Matt. > > >-Original Message- >From: James Montebello [mailto:[EMAIL PROTECTED]] >Sent: 09 January 2002 19:43 >To: Matthew Darcy >Cc: Ho Kam; Gerald Clark; MySql List >Subject: RE: command mysql -u $user without typing it > > > >You must do a "FLUSH PRIVILEGES" after making any changes to the user >permissions before they will actually take effect. This is documented. > >james montebello > >On Wed, 9 Jan 2002, Matthew Darcy wrote: > >> query ok I would expect to see, but "no rows affected" ??? this must mean >it >> has not altered the database at all ?? >> >> I created a 2 new users, dba and matt >> >> I did grant all privileges to *.* to dba@"%" >> >> I cannot conntect from anything host as dba. >> >> I then did >> >> grant all privileges to *.* to matt@"jaguar.no-dns.co.uk" (my laptop) >> >> I got the no rows affected message and I cannot connect from the machine >> jaguar. >> >> something must be wrong. I used stand the pricinpals of the grant command >> but I cannot understand why no rows are affected. It does not surprise me >> that I cannot connect when no rows are affected. >> >> any other suggestions. >> >> Thanks for going into detail on this I am learning. >> >> Matt. >> >> >> -Original Message- >> From: Ho, Kam [mailto:[EMAIL PROTECTED]] >> Sent: 09 January 2002 16:57 >> To: '[EMAIL PROTECTED]'; Ho, Kam; Gerald Clark >> Cc: MySql List >> Subject: RE: command mysql -u $user without typing it >> >> >> The "Query OK, 0 rows affected" indicate that the user table is updated so >> test2 on localhost can access the mysql databases. >> >> Do you still get the "access is denyed for user @localhostto database >mysql" >> message? >> >> >> -Original Message- >> From: Matthew Darcy [mailto:[EMAIL PROTECTED]] >> Sent: Wednesday, January 09, 2002 11:51 AM >> To: Ho Kam; Gerald Clark >> Cc: MySql List >> Subject: RE: command mysql -u $user without typing it >> >> >> tired that but I am getting >> >> Query OK, 0 rows affected (0.00 sec) >> >> >> don't understand why it is not granting to the user ? >> >> Matt. >> >> >> -Original Message- >> From: Ho, Kam [mailto:[EMAIL PROTECTED]] >> Sent: 09 January 2002 16:10 >> To: '[EMAIL PROTECTED]'; Gerald Clark >> Cc: MySql List >> Subject: RE: command mysql -u $user without typing it >> >> >> Try this: >> >> mysql> grant all privileges on *.* to test2@"localhost" >> >> also read manual about the grant command. >> >> -Original Message---
RE: command mysql -u $user without typing it - getting shafted and annoyed now.
I must be going so wrong here. I deleted the users and started again. added 2 users dba and matt. Both of these have the host of % (connect from anything yes ?) I then do a grant all privileges on *.* to dba@"%" flush privileges and grant all privileges on *.* to matt@"%" flush privileges then mysql -u matt -p gives me ERROR 1045: Access denied for user: 'dba@localhost' (Using password: YES) and I am on the local host ??? what the hell is going on I thougth I understood and was getting somewhere. obviously not. Sorry to drag this up again. Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 16:10 To: '[EMAIL PROTECTED]'; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it Try this: mysql> grant all privileges on *.* to test2@"localhost" also read manual about the grant command. -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:04 AM To: Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it I read similar notes on this in the manual, saying that invoking mysql without the username will try to take the unix username if it exists in the database. I tried this with test2, it opened an mysql session no problem, but when I did a connect mysql it said "access is denyed for user @localhostto database mysql" to me this looks like it is trying to connect with no user instead of test2@localhost can you explain this ? Thanks, Matt. -Original Message- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 15:56 To: [EMAIL PROTECTED] Cc: MySql List Subject: Re: command mysql -u $user without typing it Matthew Darcy wrote: > >I have 3 UNIX users on my server. > >test1, test2, and test3. > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > >If I want to connect to the database as root then I understand I must do >mysql -u root -p > >but I would like test1 2 and 3 to be able to type mysql and be either logged >in as their unix username, ie test2 types mysql and connects to the database >as test2 (mysql account) >or at least be prompted for the password for test2. > >The only way I can think of doing this is by setting up an alias ie > >alias mysql_connect=`mysql -u $username -p` > >there must be some sort of autologin from username like in oracle. > >Thanks, > >Matt. > The user defaults to the unix user. You can put a .my.cnf file in their home directory with [client] password=whatever to make it even easier. - 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 - 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: command mysql -u $user without typing it ????
_to_ is a typo for _on_ when typing these emails. so many to's and on's in my head. -Original Message- From: Quentin Bennett [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 23:36 To: '[EMAIL PROTECTED]'; James Montebello Cc: Ho Kam; Gerald Clark; MySql List Subject: RE: command mysql -u $user without typing it Just to check: you are doing GRANT ALL PRIVILEGES ON *.* to user@localhost; FLUSH PRIVILEGES; previous examples have had grant all privileges _to_ *.* to user@localhost or is _to_ a synonym for _on_? Quentin -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Thursday, 10 January 2002 12:27 p.m. To: James Montebello Cc: Ho Kam; Gerald Clark; MySql List Subject: RE: command mysql -u $user without typing it I was aware of the user table as a standard table. I did a select on it and it all looked fine. Loads of Y's and % for host Yet this user still cannot connect. The only explaination is corruption. Although I am still looking at it. -Original Message- From: James Montebello [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 21:33 To: Matthew Darcy Cc: Ho Kam; Gerald Clark; MySql List Subject: RE: command mysql -u $user without typing it The mysql user permissions are just a table in the mysql database. Whenever you do a GRANT, you're really just doing an INSERT or UPDATE against this table. You can do SELECTs, INSERTs, UPDATEs, etc. against this table (the 'user' table), just like any other table. The only way to "corrupt user accounts" is to corrupt this table in some way. There is no magic here. james montebello On Wed, 9 Jan 2002, Matthew Darcy wrote: > I was doing a flush privileges. > > but this was coming up with the same thing no rows affected which to me was > concerning. > > I have now got 1 user working but 1 user not. > > I am going to delete all users and start again with the users, as at the > start I was not doing flush privileges and I was also trying put hostnames > without DNS into the hosts field. I may have corrupted the user accounts in > some way. > > I'll keep you posted. > > Thanks for the help and the good explainations though. > > I am sure it will be a user error on my part if 1 user is working and > another 1 not. > > Cheers. > > Matt. > > > -Original Message- > From: James Montebello [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2002 19:43 > To: Matthew Darcy > Cc: Ho Kam; Gerald Clark; MySql List > Subject: RE: command mysql -u $user without typing it > > > > You must do a "FLUSH PRIVILEGES" after making any changes to the user > permissions before they will actually take effect. This is documented. > > james montebello > > On Wed, 9 Jan 2002, Matthew Darcy wrote: > > > query ok I would expect to see, but "no rows affected" ??? this must mean > it > > has not altered the database at all ?? > > > > I created a 2 new users, dba and matt > > > > I did grant all privileges to *.* to dba@"%" > > > > I cannot conntect from anything host as dba. > > > > I then did > > > > grant all privileges to *.* to matt@"jaguar.no-dns.co.uk" (my laptop) > > > > I got the no rows affected message and I cannot connect from the machine > > jaguar. > > > > something must be wrong. I used stand the pricinpals of the grant command > > but I cannot understand why no rows are affected. It does not surprise me > > that I cannot connect when no rows are affected. > > > > any other suggestions. > > > > Thanks for going into detail on this I am learning. > > > > Matt. > > > > > > -Original Message- > > From: Ho, Kam [mailto:[EMAIL PROTECTED]] > > Sent: 09 January 2002 16:57 > > To: '[EMAIL PROTECTED]'; Ho, Kam; Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it > > > > > > The "Query OK, 0 rows affected" indicate that the user table is updated so > > test2 on localhost can access the mysql databases. > > > > Do you still get the "access is denyed for user @localhostto database > mysql" > > message? > > > > > > -Original Message- > > From: Matthew Darcy [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, January 09, 2002 11:51 AM > > To: Ho Kam; Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it > > > > > > tired that but I am getting > > > > Query OK, 0 rows affected (0.00 sec) > > > > > > don't understand why it is not grant
Re: command mysql -u $user without typing it ????
Matthew Darcy writes: > I was aware of the user table as a standard table. > > I did a select on it and it all looked fine. Loads of Y's and % for host > Yet this user still cannot connect. The only explaination is corruption. It sounds to me like you haven't removed the @localhost entry, but you want user@% to be matched when you connect from localhost. Could that be it? If so, section 4.2.8 is your (rather dull) friend. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: command mysql -u $user without typing it ????
Matt: I don't remember you saying what machine you're running mysql on. Try adding another copy of the same user only @localhost. My win32 installation requires that for a dos box. The hosting service I use doesn't seem to care as it almost seems to ignore the Host column. GRANT ALL PRIVILEGES ON *.* TO foo@localhost IDENTIFIED BY 'password' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO foo@"%" IDENTIFIED BY 'password' WITH GRANT OPTION; Good luck. Doug On Wed, 9 Jan 2002 20:38:46 -, Matthew Darcy wrote: >I was doing a flush privileges. > >but this was coming up with the same thing no rows affected which to me was >concerning. > >I have now got 1 user working but 1 user not. > >I am going to delete all users and start again with the users, as at the >start I was not doing flush privileges and I was also trying put hostnames >without DNS into the hosts field. I may have corrupted the user accounts in >some way. > >I'll keep you posted. > >Thanks for the help and the good explainations though. > >I am sure it will be a user error on my part if 1 user is working and >another 1 not. > >Cheers. > >Matt. > > >-Original Message- >From: James Montebello [mailto:[EMAIL PROTECTED]] >Sent: 09 January 2002 19:43 >To: Matthew Darcy >Cc: Ho Kam; Gerald Clark; MySql List >Subject: RE: command mysql -u $user without typing it > > > >You must do a "FLUSH PRIVILEGES" after making any changes to the user >permissions before they will actually take effect. This is documented. > >james montebello > >On Wed, 9 Jan 2002, Matthew Darcy wrote: > >> query ok I would expect to see, but "no rows affected" ??? this must mean >it >> has not altered the database at all ?? >> >> I created a 2 new users, dba and matt >> >> I did grant all privileges to *.* to dba@"%" >> >> I cannot conntect from anything host as dba. >> >> I then did >> >> grant all privileges to *.* to matt@"jaguar.no-dns.co.uk" (my laptop) >> >> I got the no rows affected message and I cannot connect from the machine >> jaguar. >> >> something must be wrong. I used stand the pricinpals of the grant command >> but I cannot understand why no rows are affected. It does not surprise me >> that I cannot connect when no rows are affected. >> >> any other suggestions. >> >> Thanks for going into detail on this I am learning. >> >> Matt. >> >> >> -Original Message- >> From: Ho, Kam [mailto:[EMAIL PROTECTED]] >> Sent: 09 January 2002 16:57 >> To: '[EMAIL PROTECTED]'; Ho, Kam; Gerald Clark >> Cc: MySql List >> Subject: RE: command mysql -u $user without typing it >> >> >> The "Query OK, 0 rows affected" indicate that the user table is updated so >> test2 on localhost can access the mysql databases. >> >> Do you still get the "access is denyed for user @localhostto database >mysql" >> message? >> >> >> -Original Message- >> From: Matthew Darcy [mailto:[EMAIL PROTECTED]] >> Sent: Wednesday, January 09, 2002 11:51 AM >> To: Ho Kam; Gerald Clark >> Cc: MySql List >> Subject: RE: command mysql -u $user without typing it >> >> >> tired that but I am getting >> >> Query OK, 0 rows affected (0.00 sec) >> >> >> don't understand why it is not granting to the user ? >> >> Matt. >> >> >> -Original Message- >> From: Ho, Kam [mailto:[EMAIL PROTECTED]] >> Sent: 09 January 2002 16:10 >> To: '[EMAIL PROTECTED]'; Gerald Clark >> Cc: MySql List >> Subject: RE: command mysql -u $user without typing it >> >> >> Try this: >> >> mysql> grant all privileges on *.* to test2@"localhost" >> >> also read manual about the grant command. >> >> -Original Message- >> From: Matthew Darcy [mailto:[EMAIL PROTECTED]] >> Sent: Wednesday, January 09, 2002 11:04 AM >> To: Gerald Clark >> Cc: MySql List >> Subject: RE: command mysql -u $user without typing it >> >> >> I read similar notes on this in the manual, saying that invoking mysql >> without the username will try to take the unix username if it exists in >the >> database. >> >> I tried this with test2, it opened an mysql session no problem, but when I >> did a connect mysql it said "access is denyed for user @localhostto >database >> mysql" >> >> to me th
RE: command mysql -u $user without typing it ????
Just to check: you are doing GRANT ALL PRIVILEGES ON *.* to user@localhost; FLUSH PRIVILEGES; previous examples have had grant all privileges _to_ *.* to user@localhost or is _to_ a synonym for _on_? Quentin -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Thursday, 10 January 2002 12:27 p.m. To: James Montebello Cc: Ho Kam; Gerald Clark; MySql List Subject: RE: command mysql -u $user without typing it I was aware of the user table as a standard table. I did a select on it and it all looked fine. Loads of Y's and % for host Yet this user still cannot connect. The only explaination is corruption. Although I am still looking at it. -Original Message- From: James Montebello [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 21:33 To: Matthew Darcy Cc: Ho Kam; Gerald Clark; MySql List Subject: RE: command mysql -u $user without typing it The mysql user permissions are just a table in the mysql database. Whenever you do a GRANT, you're really just doing an INSERT or UPDATE against this table. You can do SELECTs, INSERTs, UPDATEs, etc. against this table (the 'user' table), just like any other table. The only way to "corrupt user accounts" is to corrupt this table in some way. There is no magic here. james montebello On Wed, 9 Jan 2002, Matthew Darcy wrote: > I was doing a flush privileges. > > but this was coming up with the same thing no rows affected which to me was > concerning. > > I have now got 1 user working but 1 user not. > > I am going to delete all users and start again with the users, as at the > start I was not doing flush privileges and I was also trying put hostnames > without DNS into the hosts field. I may have corrupted the user accounts in > some way. > > I'll keep you posted. > > Thanks for the help and the good explainations though. > > I am sure it will be a user error on my part if 1 user is working and > another 1 not. > > Cheers. > > Matt. > > > -Original Message- > From: James Montebello [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2002 19:43 > To: Matthew Darcy > Cc: Ho Kam; Gerald Clark; MySql List > Subject: RE: command mysql -u $user without typing it > > > > You must do a "FLUSH PRIVILEGES" after making any changes to the user > permissions before they will actually take effect. This is documented. > > james montebello > > On Wed, 9 Jan 2002, Matthew Darcy wrote: > > > query ok I would expect to see, but "no rows affected" ??? this must mean > it > > has not altered the database at all ?? > > > > I created a 2 new users, dba and matt > > > > I did grant all privileges to *.* to dba@"%" > > > > I cannot conntect from anything host as dba. > > > > I then did > > > > grant all privileges to *.* to matt@"jaguar.no-dns.co.uk" (my laptop) > > > > I got the no rows affected message and I cannot connect from the machine > > jaguar. > > > > something must be wrong. I used stand the pricinpals of the grant command > > but I cannot understand why no rows are affected. It does not surprise me > > that I cannot connect when no rows are affected. > > > > any other suggestions. > > > > Thanks for going into detail on this I am learning. > > > > Matt. > > > > > > -Original Message- > > From: Ho, Kam [mailto:[EMAIL PROTECTED]] > > Sent: 09 January 2002 16:57 > > To: '[EMAIL PROTECTED]'; Ho, Kam; Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it > > > > > > The "Query OK, 0 rows affected" indicate that the user table is updated so > > test2 on localhost can access the mysql databases. > > > > Do you still get the "access is denyed for user @localhostto database > mysql" > > message? > > > > > > -Original Message- > > From: Matthew Darcy [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, January 09, 2002 11:51 AM > > To: Ho Kam; Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it > > > > > > tired that but I am getting > > > > Query OK, 0 rows affected (0.00 sec) > > > > > > don't understand why it is not granting to the user ? > > > > Matt. > > > > > > -Original Message- > > From: Ho, Kam [mailto:[EMAIL PROTECTED]] > > Sent: 09 January 2002 16:10 > > To: '[EMAIL PROTECTED]'; Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it &
RE: command mysql -u $user without typing it ????
I was aware of the user table as a standard table. I did a select on it and it all looked fine. Loads of Y's and % for host Yet this user still cannot connect. The only explaination is corruption. Although I am still looking at it. -Original Message- From: James Montebello [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 21:33 To: Matthew Darcy Cc: Ho Kam; Gerald Clark; MySql List Subject: RE: command mysql -u $user without typing it The mysql user permissions are just a table in the mysql database. Whenever you do a GRANT, you're really just doing an INSERT or UPDATE against this table. You can do SELECTs, INSERTs, UPDATEs, etc. against this table (the 'user' table), just like any other table. The only way to "corrupt user accounts" is to corrupt this table in some way. There is no magic here. james montebello On Wed, 9 Jan 2002, Matthew Darcy wrote: > I was doing a flush privileges. > > but this was coming up with the same thing no rows affected which to me was > concerning. > > I have now got 1 user working but 1 user not. > > I am going to delete all users and start again with the users, as at the > start I was not doing flush privileges and I was also trying put hostnames > without DNS into the hosts field. I may have corrupted the user accounts in > some way. > > I'll keep you posted. > > Thanks for the help and the good explainations though. > > I am sure it will be a user error on my part if 1 user is working and > another 1 not. > > Cheers. > > Matt. > > > -Original Message- > From: James Montebello [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2002 19:43 > To: Matthew Darcy > Cc: Ho Kam; Gerald Clark; MySql List > Subject: RE: command mysql -u $user without typing it > > > > You must do a "FLUSH PRIVILEGES" after making any changes to the user > permissions before they will actually take effect. This is documented. > > james montebello > > On Wed, 9 Jan 2002, Matthew Darcy wrote: > > > query ok I would expect to see, but "no rows affected" ??? this must mean > it > > has not altered the database at all ?? > > > > I created a 2 new users, dba and matt > > > > I did grant all privileges to *.* to dba@"%" > > > > I cannot conntect from anything host as dba. > > > > I then did > > > > grant all privileges to *.* to matt@"jaguar.no-dns.co.uk" (my laptop) > > > > I got the no rows affected message and I cannot connect from the machine > > jaguar. > > > > something must be wrong. I used stand the pricinpals of the grant command > > but I cannot understand why no rows are affected. It does not surprise me > > that I cannot connect when no rows are affected. > > > > any other suggestions. > > > > Thanks for going into detail on this I am learning. > > > > Matt. > > > > > > -Original Message- > > From: Ho, Kam [mailto:[EMAIL PROTECTED]] > > Sent: 09 January 2002 16:57 > > To: '[EMAIL PROTECTED]'; Ho, Kam; Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it > > > > > > The "Query OK, 0 rows affected" indicate that the user table is updated so > > test2 on localhost can access the mysql databases. > > > > Do you still get the "access is denyed for user @localhostto database > mysql" > > message? > > > > > > -Original Message- > > From: Matthew Darcy [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, January 09, 2002 11:51 AM > > To: Ho Kam; Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it > > > > > > tired that but I am getting > > > > Query OK, 0 rows affected (0.00 sec) > > > > > > don't understand why it is not granting to the user ? > > > > Matt. > > > > > > -Original Message- > > From: Ho, Kam [mailto:[EMAIL PROTECTED]] > > Sent: 09 January 2002 16:10 > > To: '[EMAIL PROTECTED]'; Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it > > > > > > Try this: > > > > mysql> grant all privileges on *.* to test2@"localhost" > > > > also read manual about the grant command. > > > > -Original Message- > > From: Matthew Darcy [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, January 09, 2002 11:04 AM > > To: Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typi
RE: command mysql -u $user without typing it ????
The mysql user permissions are just a table in the mysql database. Whenever you do a GRANT, you're really just doing an INSERT or UPDATE against this table. You can do SELECTs, INSERTs, UPDATEs, etc. against this table (the 'user' table), just like any other table. The only way to "corrupt user accounts" is to corrupt this table in some way. There is no magic here. james montebello On Wed, 9 Jan 2002, Matthew Darcy wrote: > I was doing a flush privileges. > > but this was coming up with the same thing no rows affected which to me was > concerning. > > I have now got 1 user working but 1 user not. > > I am going to delete all users and start again with the users, as at the > start I was not doing flush privileges and I was also trying put hostnames > without DNS into the hosts field. I may have corrupted the user accounts in > some way. > > I'll keep you posted. > > Thanks for the help and the good explainations though. > > I am sure it will be a user error on my part if 1 user is working and > another 1 not. > > Cheers. > > Matt. > > > -Original Message- > From: James Montebello [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2002 19:43 > To: Matthew Darcy > Cc: Ho Kam; Gerald Clark; MySql List > Subject: RE: command mysql -u $user without typing it > > > > You must do a "FLUSH PRIVILEGES" after making any changes to the user > permissions before they will actually take effect. This is documented. > > james montebello > > On Wed, 9 Jan 2002, Matthew Darcy wrote: > > > query ok I would expect to see, but "no rows affected" ??? this must mean > it > > has not altered the database at all ?? > > > > I created a 2 new users, dba and matt > > > > I did grant all privileges to *.* to dba@"%" > > > > I cannot conntect from anything host as dba. > > > > I then did > > > > grant all privileges to *.* to matt@"jaguar.no-dns.co.uk" (my laptop) > > > > I got the no rows affected message and I cannot connect from the machine > > jaguar. > > > > something must be wrong. I used stand the pricinpals of the grant command > > but I cannot understand why no rows are affected. It does not surprise me > > that I cannot connect when no rows are affected. > > > > any other suggestions. > > > > Thanks for going into detail on this I am learning. > > > > Matt. > > > > > > -Original Message- > > From: Ho, Kam [mailto:[EMAIL PROTECTED]] > > Sent: 09 January 2002 16:57 > > To: '[EMAIL PROTECTED]'; Ho, Kam; Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it > > > > > > The "Query OK, 0 rows affected" indicate that the user table is updated so > > test2 on localhost can access the mysql databases. > > > > Do you still get the "access is denyed for user @localhostto database > mysql" > > message? > > > > > > -Original Message- > > From: Matthew Darcy [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, January 09, 2002 11:51 AM > > To: Ho Kam; Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it > > > > > > tired that but I am getting > > > > Query OK, 0 rows affected (0.00 sec) > > > > > > don't understand why it is not granting to the user ? > > > > Matt. > > > > > > -Original Message- > > From: Ho, Kam [mailto:[EMAIL PROTECTED]] > > Sent: 09 January 2002 16:10 > > To: '[EMAIL PROTECTED]'; Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it > > > > > > Try this: > > > > mysql> grant all privileges on *.* to test2@"localhost" > > > > also read manual about the grant command. > > > > -Original Message- > > From: Matthew Darcy [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, January 09, 2002 11:04 AM > > To: Gerald Clark > > Cc: MySql List > > Subject: RE: command mysql -u $user without typing it > > > > > > I read similar notes on this in the manual, saying that invoking mysql > > without the username will try to take the unix username if it exists in > the > > database. > > > > I tried this with test2, it opened an mysql session no problem, but when I > > did a connect mysql it said "access is denyed for user @localhostto > database > > mysql" > &g
RE: command mysql -u $user without typing it ????
I was doing a flush privileges. but this was coming up with the same thing no rows affected which to me was concerning. I have now got 1 user working but 1 user not. I am going to delete all users and start again with the users, as at the start I was not doing flush privileges and I was also trying put hostnames without DNS into the hosts field. I may have corrupted the user accounts in some way. I'll keep you posted. Thanks for the help and the good explainations though. I am sure it will be a user error on my part if 1 user is working and another 1 not. Cheers. Matt. -Original Message- From: James Montebello [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 19:43 To: Matthew Darcy Cc: Ho Kam; Gerald Clark; MySql List Subject: RE: command mysql -u $user without typing it You must do a "FLUSH PRIVILEGES" after making any changes to the user permissions before they will actually take effect. This is documented. james montebello On Wed, 9 Jan 2002, Matthew Darcy wrote: > query ok I would expect to see, but "no rows affected" ??? this must mean it > has not altered the database at all ?? > > I created a 2 new users, dba and matt > > I did grant all privileges to *.* to dba@"%" > > I cannot conntect from anything host as dba. > > I then did > > grant all privileges to *.* to matt@"jaguar.no-dns.co.uk" (my laptop) > > I got the no rows affected message and I cannot connect from the machine > jaguar. > > something must be wrong. I used stand the pricinpals of the grant command > but I cannot understand why no rows are affected. It does not surprise me > that I cannot connect when no rows are affected. > > any other suggestions. > > Thanks for going into detail on this I am learning. > > Matt. > > > -Original Message- > From: Ho, Kam [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2002 16:57 > To: '[EMAIL PROTECTED]'; Ho, Kam; Gerald Clark > Cc: MySql List > Subject: RE: command mysql -u $user without typing it > > > The "Query OK, 0 rows affected" indicate that the user table is updated so > test2 on localhost can access the mysql databases. > > Do you still get the "access is denyed for user @localhostto database mysql" > message? > > > -Original Message- > From: Matthew Darcy [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 09, 2002 11:51 AM > To: Ho Kam; Gerald Clark > Cc: MySql List > Subject: RE: command mysql -u $user without typing it > > > tired that but I am getting > > Query OK, 0 rows affected (0.00 sec) > > > don't understand why it is not granting to the user ? > > Matt. > > > -Original Message- > From: Ho, Kam [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2002 16:10 > To: '[EMAIL PROTECTED]'; Gerald Clark > Cc: MySql List > Subject: RE: command mysql -u $user without typing it > > > Try this: > > mysql> grant all privileges on *.* to test2@"localhost" > > also read manual about the grant command. > > -Original Message- > From: Matthew Darcy [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 09, 2002 11:04 AM > To: Gerald Clark > Cc: MySql List > Subject: RE: command mysql -u $user without typing it > > > I read similar notes on this in the manual, saying that invoking mysql > without the username will try to take the unix username if it exists in the > database. > > I tried this with test2, it opened an mysql session no problem, but when I > did a connect mysql it said "access is denyed for user @localhostto database > mysql" > > to me this looks like it is trying to connect with no user instead of > test2@localhost > > can you explain this ? > > Thanks, > > Matt. > > > -Original Message- > From: Gerald Clark [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2002 15:56 > To: [EMAIL PROTECTED] > Cc: MySql List > Subject: Re: command mysql -u $user without typing it > > > > > Matthew Darcy wrote: > > > > >I have 3 UNIX users on my server. > > > >test1, test2, and test3. > > > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > > > >If I want to connect to the database as root then I understand I must do > >mysql -u root -p > > > >but I would like test1 2 and 3 to be able to type mysql and be either > logged > >in as their unix username, ie test2 types mysql and connects to the > database > >as test2 (mysql account) > >or at least be prompted for the password for test2. > > > >The only way I can think of doing this is by setting up an alia
RE: command mysql -u $user without typing it ????
You must do a "FLUSH PRIVILEGES" after making any changes to the user permissions before they will actually take effect. This is documented. james montebello On Wed, 9 Jan 2002, Matthew Darcy wrote: > query ok I would expect to see, but "no rows affected" ??? this must mean it > has not altered the database at all ?? > > I created a 2 new users, dba and matt > > I did grant all privileges to *.* to dba@"%" > > I cannot conntect from anything host as dba. > > I then did > > grant all privileges to *.* to matt@"jaguar.no-dns.co.uk" (my laptop) > > I got the no rows affected message and I cannot connect from the machine > jaguar. > > something must be wrong. I used stand the pricinpals of the grant command > but I cannot understand why no rows are affected. It does not surprise me > that I cannot connect when no rows are affected. > > any other suggestions. > > Thanks for going into detail on this I am learning. > > Matt. > > > -Original Message- > From: Ho, Kam [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2002 16:57 > To: '[EMAIL PROTECTED]'; Ho, Kam; Gerald Clark > Cc: MySql List > Subject: RE: command mysql -u $user without typing it > > > The "Query OK, 0 rows affected" indicate that the user table is updated so > test2 on localhost can access the mysql databases. > > Do you still get the "access is denyed for user @localhostto database mysql" > message? > > > -----Original Message- > From: Matthew Darcy [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 09, 2002 11:51 AM > To: Ho Kam; Gerald Clark > Cc: MySql List > Subject: RE: command mysql -u $user without typing it > > > tired that but I am getting > > Query OK, 0 rows affected (0.00 sec) > > > don't understand why it is not granting to the user ? > > Matt. > > > -Original Message- > From: Ho, Kam [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2002 16:10 > To: '[EMAIL PROTECTED]'; Gerald Clark > Cc: MySql List > Subject: RE: command mysql -u $user without typing it > > > Try this: > > mysql> grant all privileges on *.* to test2@"localhost" > > also read manual about the grant command. > > -Original Message- > From: Matthew Darcy [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 09, 2002 11:04 AM > To: Gerald Clark > Cc: MySql List > Subject: RE: command mysql -u $user without typing it > > > I read similar notes on this in the manual, saying that invoking mysql > without the username will try to take the unix username if it exists in the > database. > > I tried this with test2, it opened an mysql session no problem, but when I > did a connect mysql it said "access is denyed for user @localhostto database > mysql" > > to me this looks like it is trying to connect with no user instead of > test2@localhost > > can you explain this ? > > Thanks, > > Matt. > > > -Original Message- > From: Gerald Clark [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2002 15:56 > To: [EMAIL PROTECTED] > Cc: MySql List > Subject: Re: command mysql -u $user without typing it > > > > > Matthew Darcy wrote: > > > > >I have 3 UNIX users on my server. > > > >test1, test2, and test3. > > > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > > > >If I want to connect to the database as root then I understand I must do > >mysql -u root -p > > > >but I would like test1 2 and 3 to be able to type mysql and be either > logged > >in as their unix username, ie test2 types mysql and connects to the > database > >as test2 (mysql account) > >or at least be prompted for the password for test2. > > > >The only way I can think of doing this is by setting up an alias ie > > > >alias mysql_connect=`mysql -u $username -p` > > > >there must be some sort of autologin from username like in oracle. > > > >Thanks, > > > >Matt. > > > The user defaults to the unix user. > You can put a .my.cnf file in their home directory with > > [client] > password=whatever > > to make it even easier. > > > - > 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]> > Tro
RE: command mysql -u $user without typing it ????
Are you doing 'flush privileges' are documented? -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Thursday, 10 January 2002 8:26 a.m. To: Ho Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it query ok I would expect to see, but "no rows affected" ??? this must mean it has not altered the database at all ?? I created a 2 new users, dba and matt I did grant all privileges to *.* to dba@"%" I cannot conntect from anything host as dba. I then did grant all privileges to *.* to matt@"jaguar.no-dns.co.uk" (my laptop) I got the no rows affected message and I cannot connect from the machine jaguar. something must be wrong. I used stand the pricinpals of the grant command but I cannot understand why no rows are affected. It does not surprise me that I cannot connect when no rows are affected. any other suggestions. Thanks for going into detail on this I am learning. Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 16:57 To: '[EMAIL PROTECTED]'; Ho, Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it The "Query OK, 0 rows affected" indicate that the user table is updated so test2 on localhost can access the mysql databases. Do you still get the "access is denyed for user @localhostto database mysql" message? -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:51 AM To: Ho Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it tired that but I am getting Query OK, 0 rows affected (0.00 sec) don't understand why it is not granting to the user ? Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 16:10 To: '[EMAIL PROTECTED]'; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it Try this: mysql> grant all privileges on *.* to test2@"localhost" also read manual about the grant command. -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:04 AM To: Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it I read similar notes on this in the manual, saying that invoking mysql without the username will try to take the unix username if it exists in the database. I tried this with test2, it opened an mysql session no problem, but when I did a connect mysql it said "access is denyed for user @localhostto database mysql" to me this looks like it is trying to connect with no user instead of test2@localhost can you explain this ? Thanks, Matt. -Original Message- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 15:56 To: [EMAIL PROTECTED] Cc: MySql List Subject: Re: command mysql -u $user without typing it Matthew Darcy wrote: > >I have 3 UNIX users on my server. > >test1, test2, and test3. > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > >If I want to connect to the database as root then I understand I must do >mysql -u root -p > >but I would like test1 2 and 3 to be able to type mysql and be either logged >in as their unix username, ie test2 types mysql and connects to the database >as test2 (mysql account) >or at least be prompted for the password for test2. > >The only way I can think of doing this is by setting up an alias ie > >alias mysql_connect=`mysql -u $username -p` > >there must be some sort of autologin from username like in oracle. > >Thanks, > >Matt. > The user defaults to the unix user. You can put a .my.cnf file in their home directory with [client] password=whatever to make it even easier. - 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]> T
RE: command mysql -u $user without typing it ????
Matt: Try the following: Use mysql select * from user (take a note on users that you're granting rights to) run the grant command select * from user (see if there is any differences) OR try grant all privileges to *.* to matt@"ipaddress" (where ipaddress == 999.999.999.999 your real ip address) -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 2:26 PM To: Ho Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it query ok I would expect to see, but "no rows affected" ??? this must mean it has not altered the database at all ?? I created a 2 new users, dba and matt I did grant all privileges to *.* to dba@"%" I cannot conntect from anything host as dba. I then did grant all privileges to *.* to matt@"jaguar.no-dns.co.uk" (my laptop) I got the no rows affected message and I cannot connect from the machine jaguar. something must be wrong. I used stand the pricinpals of the grant command but I cannot understand why no rows are affected. It does not surprise me that I cannot connect when no rows are affected. any other suggestions. Thanks for going into detail on this I am learning. Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 16:57 To: '[EMAIL PROTECTED]'; Ho, Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it The "Query OK, 0 rows affected" indicate that the user table is updated so test2 on localhost can access the mysql databases. Do you still get the "access is denyed for user @localhostto database mysql" message? -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:51 AM To: Ho Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it tired that but I am getting Query OK, 0 rows affected (0.00 sec) don't understand why it is not granting to the user ? Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 16:10 To: '[EMAIL PROTECTED]'; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it Try this: mysql> grant all privileges on *.* to test2@"localhost" also read manual about the grant command. -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:04 AM To: Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it I read similar notes on this in the manual, saying that invoking mysql without the username will try to take the unix username if it exists in the database. I tried this with test2, it opened an mysql session no problem, but when I did a connect mysql it said "access is denyed for user @localhostto database mysql" to me this looks like it is trying to connect with no user instead of test2@localhost can you explain this ? Thanks, Matt. -Original Message- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 15:56 To: [EMAIL PROTECTED] Cc: MySql List Subject: Re: command mysql -u $user without typing it Matthew Darcy wrote: > >I have 3 UNIX users on my server. > >test1, test2, and test3. > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > >If I want to connect to the database as root then I understand I must do >mysql -u root -p > >but I would like test1 2 and 3 to be able to type mysql and be either logged >in as their unix username, ie test2 types mysql and connects to the database >as test2 (mysql account) >or at least be prompted for the password for test2. > >The only way I can think of doing this is by setting up an alias ie > >alias mysql_connect=`mysql -u $username -p` > >there must be some sort of autologin from username like in oracle. > >Thanks, > >Matt. > The user defaults to the unix user. You can put a .my.cnf file in their home directory with [client] password=whatever to make it even easier. - 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: command mysql -u $user without typing it ????
query ok I would expect to see, but "no rows affected" ??? this must mean it has not altered the database at all ?? I created a 2 new users, dba and matt I did grant all privileges to *.* to dba@"%" I cannot conntect from anything host as dba. I then did grant all privileges to *.* to matt@"jaguar.no-dns.co.uk" (my laptop) I got the no rows affected message and I cannot connect from the machine jaguar. something must be wrong. I used stand the pricinpals of the grant command but I cannot understand why no rows are affected. It does not surprise me that I cannot connect when no rows are affected. any other suggestions. Thanks for going into detail on this I am learning. Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 16:57 To: '[EMAIL PROTECTED]'; Ho, Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it The "Query OK, 0 rows affected" indicate that the user table is updated so test2 on localhost can access the mysql databases. Do you still get the "access is denyed for user @localhostto database mysql" message? -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:51 AM To: Ho Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it tired that but I am getting Query OK, 0 rows affected (0.00 sec) don't understand why it is not granting to the user ? Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 16:10 To: '[EMAIL PROTECTED]'; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it Try this: mysql> grant all privileges on *.* to test2@"localhost" also read manual about the grant command. -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:04 AM To: Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it I read similar notes on this in the manual, saying that invoking mysql without the username will try to take the unix username if it exists in the database. I tried this with test2, it opened an mysql session no problem, but when I did a connect mysql it said "access is denyed for user @localhostto database mysql" to me this looks like it is trying to connect with no user instead of test2@localhost can you explain this ? Thanks, Matt. -Original Message- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 15:56 To: [EMAIL PROTECTED] Cc: MySql List Subject: Re: command mysql -u $user without typing it Matthew Darcy wrote: > >I have 3 UNIX users on my server. > >test1, test2, and test3. > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > >If I want to connect to the database as root then I understand I must do >mysql -u root -p > >but I would like test1 2 and 3 to be able to type mysql and be either logged >in as their unix username, ie test2 types mysql and connects to the database >as test2 (mysql account) >or at least be prompted for the password for test2. > >The only way I can think of doing this is by setting up an alias ie > >alias mysql_connect=`mysql -u $username -p` > >there must be some sort of autologin from username like in oracle. > >Thanks, > >Matt. > The user defaults to the unix user. You can put a .my.cnf file in their home directory with [client] password=whatever to make it even easier. - 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 - Before posting, please check: http://www.mysql.com/manual.php (the manu
RE: command mysql -u $user without typing it ????
The "Query OK, 0 rows affected" indicate that the user table is updated so test2 on localhost can access the mysql databases. Do you still get the "access is denyed for user @localhostto database mysql" message? -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:51 AM To: Ho Kam; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it tired that but I am getting Query OK, 0 rows affected (0.00 sec) don't understand why it is not granting to the user ? Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 16:10 To: '[EMAIL PROTECTED]'; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it Try this: mysql> grant all privileges on *.* to test2@"localhost" also read manual about the grant command. -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:04 AM To: Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it I read similar notes on this in the manual, saying that invoking mysql without the username will try to take the unix username if it exists in the database. I tried this with test2, it opened an mysql session no problem, but when I did a connect mysql it said "access is denyed for user @localhostto database mysql" to me this looks like it is trying to connect with no user instead of test2@localhost can you explain this ? Thanks, Matt. -Original Message- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 15:56 To: [EMAIL PROTECTED] Cc: MySql List Subject: Re: command mysql -u $user without typing it Matthew Darcy wrote: > >I have 3 UNIX users on my server. > >test1, test2, and test3. > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > >If I want to connect to the database as root then I understand I must do >mysql -u root -p > >but I would like test1 2 and 3 to be able to type mysql and be either logged >in as their unix username, ie test2 types mysql and connects to the database >as test2 (mysql account) >or at least be prompted for the password for test2. > >The only way I can think of doing this is by setting up an alias ie > >alias mysql_connect=`mysql -u $username -p` > >there must be some sort of autologin from username like in oracle. > >Thanks, > >Matt. > The user defaults to the unix user. You can put a .my.cnf file in their home directory with [client] password=whatever to make it even easier. - 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: command mysql -u $user without typing it ????
tired that but I am getting Query OK, 0 rows affected (0.00 sec) don't understand why it is not granting to the user ? Matt. -Original Message- From: Ho, Kam [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 16:10 To: '[EMAIL PROTECTED]'; Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it Try this: mysql> grant all privileges on *.* to test2@"localhost" also read manual about the grant command. -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:04 AM To: Gerald Clark Cc: MySql List Subject: RE: command mysql -u $user without typing it I read similar notes on this in the manual, saying that invoking mysql without the username will try to take the unix username if it exists in the database. I tried this with test2, it opened an mysql session no problem, but when I did a connect mysql it said "access is denyed for user @localhostto database mysql" to me this looks like it is trying to connect with no user instead of test2@localhost can you explain this ? Thanks, Matt. -Original Message- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 15:56 To: [EMAIL PROTECTED] Cc: MySql List Subject: Re: command mysql -u $user without typing it Matthew Darcy wrote: > >I have 3 UNIX users on my server. > >test1, test2, and test3. > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > >If I want to connect to the database as root then I understand I must do >mysql -u root -p > >but I would like test1 2 and 3 to be able to type mysql and be either logged >in as their unix username, ie test2 types mysql and connects to the database >as test2 (mysql account) >or at least be prompted for the password for test2. > >The only way I can think of doing this is by setting up an alias ie > >alias mysql_connect=`mysql -u $username -p` > >there must be some sort of autologin from username like in oracle. > >Thanks, > >Matt. > The user defaults to the unix user. You can put a .my.cnf file in their home directory with [client] password=whatever to make it even easier. - 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: command mysql -u $user without typing it ????
I read similar notes on this in the manual, saying that invoking mysql without the username will try to take the unix username if it exists in the database. I tried this with test2, it opened an mysql session no problem, but when I did a connect mysql it said "access is denyed for user @localhostto database mysql" to me this looks like it is trying to connect with no user instead of test2@localhost can you explain this ? Thanks, Matt. -Original Message- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 15:56 To: [EMAIL PROTECTED] Cc: MySql List Subject: Re: command mysql -u $user without typing it Matthew Darcy wrote: > >I have 3 UNIX users on my server. > >test1, test2, and test3. > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > >If I want to connect to the database as root then I understand I must do >mysql -u root -p > >but I would like test1 2 and 3 to be able to type mysql and be either logged >in as their unix username, ie test2 types mysql and connects to the database >as test2 (mysql account) >or at least be prompted for the password for test2. > >The only way I can think of doing this is by setting up an alias ie > >alias mysql_connect=`mysql -u $username -p` > >there must be some sort of autologin from username like in oracle. > >Thanks, > >Matt. > The user defaults to the unix user. You can put a .my.cnf file in their home directory with [client] password=whatever to make it even easier. - 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: command mysql -u $user without typing it ????
Matthew Darcy writes: > If I want to connect to the database as root then I understand I must do > mysql -u root -p Unless you're logged in as root, in which case mysql -p is enough. > but I would like test1 2 and 3 to be able to type mysql and be either logged > in as their unix username, ie test2 types mysql and connects to the database > as test2 (mysql account) > or at least be prompted for the password for test2. Unless you have a broken version of mysql, not specifying a username is equivalent to specifying -u `whoami`. If you want the users to be prompted for a password, try alias mysql="mysql -p" //C - thinks that'll do it. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: command mysql -u $user without typing it ????
Matthew Darcy wrote: > >I have 3 UNIX users on my server. > >test1, test2, and test3. > >I have created 3 users for mysql test1, test2, and test3 (shock horror) > >If I want to connect to the database as root then I understand I must do >mysql -u root -p > >but I would like test1 2 and 3 to be able to type mysql and be either logged >in as their unix username, ie test2 types mysql and connects to the database >as test2 (mysql account) >or at least be prompted for the password for test2. > >The only way I can think of doing this is by setting up an alias ie > >alias mysql_connect=`mysql -u $username -p` > >there must be some sort of autologin from username like in oracle. > >Thanks, > >Matt. > The user defaults to the unix user. You can put a .my.cnf file in their home directory with [client] password=whatever to make it even easier. - 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