26 messages in com.mysql.lists.mysqlRE: command mysql -u $user without ty...| From | Sent On | Attachments |
|---|---|---|
| Matthew Darcy | 09 Jan 2002 07:23 | |
| Gerald Clark | 09 Jan 2002 07:55 | |
| Matthew Darcy | 09 Jan 2002 08:03 | |
| Carl Troein | 09 Jan 2002 08:03 | |
| Ho, Kam | 09 Jan 2002 08:09 | |
| Matthew Darcy | 09 Jan 2002 08:50 | |
| Ho, Kam | 09 Jan 2002 08:56 | |
| Matthew Darcy | 09 Jan 2002 11:25 | |
| Ho, Kam | 09 Jan 2002 11:30 | |
| Quentin Bennett | 09 Jan 2002 11:39 | |
| James Montebello | 09 Jan 2002 11:43 | |
| Matthew Darcy | 09 Jan 2002 12:38 | |
| James Montebello | 09 Jan 2002 13:32 | |
| Matthew Darcy | 09 Jan 2002 15:26 | |
| Quentin Bennett | 09 Jan 2002 15:35 | |
| Doug Thompson | 09 Jan 2002 20:38 | |
| Carl Troein | 09 Jan 2002 23:37 | |
| Matthew Darcy | 10 Jan 2002 01:50 | |
| Matthew Darcy | 10 Jan 2002 02:10 | |
| Matthew Darcy | 10 Jan 2002 04:24 | |
| Matthew Darcy | 10 Jan 2002 04:30 | |
| Ho, Kam | 10 Jan 2002 06:00 | |
| Gerald Clark | 10 Jan 2002 07:01 | |
| Matthew Darcy | 10 Jan 2002 07:09 | |
| Quentin Bennett | 10 Jan 2002 11:32 | |
| Matthew Darcy | 10 Jan 2002 12:33 |
| Subject: | RE: command mysql -u $user without typing it ????![]() |
|---|---|
| From: | Ho, Kam (kam...@ghrsystems.com) |
| Date: | 01/09/2002 08:09:28 AM |
| List: | com.mysql.lists.mysql |
Try this:
mysql> grant all privileges on *.* to test2@"localhost"
also read manual about the grant command.
-----Original Message----- From: Matthew Darcy [mailto:matt...@darcy.demon.co.uk] 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:gera...@suppliersystems.com] Sent: 09 January 2002 15:56 To: matt...@darcy.demon.co.uk 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 <mysq...@lists.mysql.com> To unsubscribe, e-mail <mysql-unsubscribe-matthew=darc...@lists.mysql.com> 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 <mysq...@lists.mysql.com> To unsubscribe, e-mail <mysql-unsubscribe-kam_ho=ghrs...@lists.mysql.com> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




