SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: logging on

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    logging on

    MySQL is on my localhost. I have set up permissions, but when I open the consol I am automatically logged on as the root user. Is this normal?

    I am trying to logon as a different user so I can test the permissions.

  2. #2
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes it is normal... if you do not supply the user, host and password arguments, mysql logins with several default values for these arguments

    use
    Code:
    $ mysql -u username -p password -h hostname
    to login with an account other than the assumed defaults (which is root or in a user login OS, your login userid, a blank password, and localhost)

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    msql login

    This does not work. I get error messages. I think the problem is

    $mysql(tech.language(unknown));

    I need this in plain english, when I open the consol it automatically comes up with:

    mysql>

    If I am on "localhost" and my user name is "user" and my password is "password", then I type:

    mysql> -h localhost -u user -p password ;

    I get an error message. Is something wrong with my configuration or my typing.

  4. #4
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    $ mysql -u username -p password -h hostname
    is for entering at your shell...

    since when you open your console it's already in mysql (indicated by the mysql> prompt) you can't do that!

    how did you open your console in the first place? and well 'console' is not equivalent to the mysql commandline (i was thinking your system console ) so please forgive my misunderstanding...

    try running mysql.exe at your system commandline instead with the arguments given...


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
  •