On 4/20/05, Arran Fraser <[EMAIL PROTECTED]> wrote:
> > OK, one time it allowed me to set a password. However no form of this
> > command seems to work for me so far. Is it the Using password: No
> > telling me to not use a password?
> 
> So you noticed that now the error isn't "lost connection" any more,
> which means your first problem (with "-h dragonfly") is fixed.
Right.

> 
> And, you say that it let you set a password, once, and now nothing
> works?  If so, that makes perfect sense, because once you have set the
> password, you can't do any mysqladmin commands without the password!

sure - makes sense. Thanks.
> 
> "Using password: NO" means that it didn't get any password from you.
> 
> You've got to keep separate: the "mysql -p xyz" that you use to
> authenticate in order to connect to the server; and the "mysqladmin
> password xyz" which means, set the password to xyz.

Right. Much to learn. I'm jsut a user and I guess mysql is required by
MythTV so I'm trying out things for the first time. I apprecaite your
help.

> 
> >
> > [EMAIL PROTECTED] ~ $ /usr/bin/mysqladmin -u root password xyz
> > /usr/bin/mysqladmin: connect to server at 'localhost' failed
> > error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)'
> 
> After one successful "mysqladmin -u root password xyz", every following
> mysqladmin and mysql must supply the password.  Try:
> 
> mysqladmin -u root -p xyz password newpass

This one I'm having trouble with. More below.

> 
> OR
> 
> mysql -u root -p xyz

This one works.

> 
> Also note that you can specify "-p " WITHOUT putting the password on the
> command line to have the program prompt you for the password instead.
> 

Great. This is very helpful. I'm not quite there yet but things are
wokring better, Thanks.

OK, I can log into the server. Here it accepted xyz as the password.

dragonfly ~ # mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 23 to server version: 4.0.24

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> \s
--------------
mysql  Ver 12.22 Distrib 4.0.24, for pc-linux-gnu (i686)

Connection id:          24
Current database:
Current user:           [EMAIL PROTECTED]
SSL:                    Not in use
Current pager:          /usr/bin/less
Using outfile:          ''
Server version:         4.0.24
Protocol version:       10
Connection:             Localhost via UNIX socket
Client characterset:    latin1
Server characterset:    latin1
UNIX socket:            /var/run/mysqld/mysqld.sock
Uptime:                 2 hours 57 min 9 sec

Threads: 1  Questions: 18  Slow queries: 0  Opens: 6  Flush tables: 1 
Open tables: 0  Queries per second avg: 0.002
--------------

mysql> \q
Bye
dragonfly ~ #

To get the password changed I had to sort of rearrange the command a
bit. Don't know why exactly:

dragonfly ~ # mysqladmin -u root password abc123 -p
Enter password: (ENTERED xyz)
dragonfly ~ # mysql -u root -p
Enter password: (ENTERED abc123)
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 41 to server version: 4.0.24

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> \q
Bye
dragonfly ~ #

So this works fine. 

Anyway, you've been very kind. I appreciate the help. I should
probably be looking for a real HOWTO on running MythTV under Gentoo. I
have a tuner card in the mail due here on Friday. I wanted to get a
jump start on the software part and hopefully be able to get a MythTV
screen up so taht when the card arrives I can work on configuring it
early in the day.

With luck I'll start to understand mysql a bit better soon. Off to
look for that HOWTO.

Thanks,
Mark

-- 
gentoo-user@gentoo.org mailing list

Reply via email to