1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

MySQL not asking the user name

Discussion in 'MySQL' started by make me rain, Sep 11, 2010.

  1. #1
    hellow every body
    i am quite new to MySQL
    i used MySQL wizard for windows to install MySQL server 5.xx
    every thing went fine

    but while login it asks only for the password not the user name

    kindly advise
    (1) why it is happening on the mysql client like this
    (2) how to log off a user like root and login as another
    (3) what mistake i have made
     
    make me rain, Sep 11, 2010 IP
  2. woods

    woods Peon

    Messages:
    228
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are you connecting through the command line client?

    You have to add --user=yourusername or it will try to connect with the current user you're logged in as on the computer. So it could look something like this:
    mysql --user=makemerain -p
    Code (markup):
    This connects to localhost, with the username "makemerain", and you will be asked to enter the password

    And a shorter variant which does the same:
    mysql --umakemerain -p
    Code (markup):
     
    woods, Sep 16, 2010 IP
  3. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #3
    there will be no passwords by default, depends on your installation..

    if im correct your accessing directly through mysql console, which is more likely doesnt ask for a username, thus, username is defaulted as root..
    once accessing the database, create/grant users or put root using_password to yes.

    theres other way around, search mysql.exe from your command prompt, run mysql.exe but giving a username

    mysql -u root -p
     
    bartolay13, Sep 16, 2010 IP
  4. make me rain

    make me rain Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks a lot for your reply

    while attempting to open the MySQL.exe through cmd prompt i am getting error as
    "error 1045(28000) access denied for 'ODBC'@'localhost' (using password 'no')

    what to do please
     
    make me rain, Sep 23, 2010 IP