At 10:25 PM -0500 8/26/99, Derek Sivers wrote:
>> >mysql> insert into user (host,user,password)
>> > values('localhost','root',password('mypassword'));
>> >
>> I don't understand the question. You've set the root account so that
>> it requires a password (in that final query above), and now you're wondering
>> why you need to specify a password when you connect as root?
>
>
>I was just following a tutorial. What should I do?
>
>All the other "mysqladmin" commands, too, give me an error unless I go
>back and
>type them with a "-p" afterwards.
>
>I'm trying to follow some tutorials but they never mention the "-p" which
>makes
>me think I did something wrong in the inital setup.
No, it's just that it gets tiresome to write out all the options
every time. It's assumed that once you set the password that you'll
have to specify it every time you connect as root thereafter. That
is, it's normal to have to specify a password. That's true for
root as well as every other account, since otherwise people that
you don't want to be able to connect can connect.
If you don't want to type it in every time, you might create a .my.cnf
file in your home directory and put this in it:
[client]
password=your-password-here
Make sure the file's not readable to anyone else, though:
chmod 600 .my.cnf
--
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/