SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    maine
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question set up passwords

    I just installed mySQL. From the terminal window, how can I set the password for the root account?
    According to the mysql website, I should do this, but I don't know how to get to shell>:
    "To use SET PASSWORD on Unix, do this:
    shell> mysql -u root
    mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
    mysql> SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd');

    In the second SET PASSWORD statement, replace host_name with the name of the server host. This is the name that is specified in the Host column of the non-localhost record for root in the user table. If you don't know what hostname this is, issue the following statement before using SET PASSWORD:

    mysql> SELECT Host, User FROM mysql.user;

    Look for the record that has root in the User column and something other than localhost in the Host column. Then use that Host value in the second SET PASSWORD statement."

    But I can't figure out how to get to shell>

    Thank you!

  2. #2
    SitePoint Enthusiast webchick's Avatar
    Join Date
    Jun 2004
    Location
    in front of a computer
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A "shell" is just another name for a command prompt. So if you were in Windows XP, for example, you'd go to Start > Run... and type in cmd and hit OK.

    They use the generic name "shell>" because that could potentially look like "C:\>" or "user@hostname:~/somedir $" or pretty much anything.

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    maine
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, but I'm Mac and I got it all figured out via the apple website. I appreciate it though.
    Cheers.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •