# [EMAIL PROTECTED] / 2003-03-29 21:52:18 -0500:
> I just downloaded and installed the "mysql-max-4.0.12.pkg", ran
> 
> cd /usr/local/mysql
>   sudo ./bin/mysqld_safe
>   (Enter your password)
>   (Press CTRL+Z)
>   (Press CTRL+D to exit the shell)
>   bg
> 
> as specified in the readme. When attempting to set the root password, I 
> successfully ran
> /usr/local/mysql/bin/mysqladmin -u root password 'new-password'
> 
> but  it choked on:
> /usr/local/mysql/bin/mysqladmin -u root -h $hostname password 
> 'new-password'
> 
> with the error: hostname: Undefined variable.
 
    that's your shell speaking. IOW, unrelated to MySQL.

    but that is just a half of the truth. your shell tells you that
    $hostname doesn't exist, but probably goes on, and executes the
    command, with "" (the empty string) substituted for the variable.
    the result is:

    mysqladmin -u root -h password 'new-password'

    IOW, you're trying to connect to a host named password. that doesn't
    exist, and mysqladmin then probably tells you something like

    mysqladmin: connect to server at 'password' failed
    error: 'Unknown MySQL Server Host 'password' (1)'
    Check that mysqld is running on password and that the port is 3306.
    You can check this by doing 'telnet password 3306'

    That is *very* explicit, and you should be able to understand what
    it says.

> Problem is, I'm such a Unix newbie I don't know how to retrieve the 
> "hostname" it is looking for.

    *what* is looking for a hostname?
    did you check what the -h switch to mysqladmin does?

> I tried the name of my computer and my user name but those didn't
> work.

    define "didn't work".

    A piece of advice that might be welcome even though unasked for:

    don't be afraid to read what the software tells you. it usually
    makes perfect sense without you needing a CS degree.

    and don't be afraid to think. when something doesn't work perfectly
    from the start, don't close your eyes in panic and yell "help!".
    using a computer is a dialogue. listen to what the computer says,
    and try to understand it.

    and finally: http://www.catb.org/~esr/faqs/smart-questions.html

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.    see http://www.eyrie.org./~eagle/faqs/questions.html

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to