Results 1 to 7 of 7
  1. #1

    Help: Mysql logon problem

    I can logon use command:

    mysql -h218.197.220.225

    But I can't logon using :

    mysql -h218.197.220.225 -uroot -p

    it replied :
    ERROR 1045: Access denied for user [email protected]' (using password: YES)

    also I can not logon using:
    mysql -uroot
    it replied :
    ERROR 2003: Can't connect to Mysql server on 'localhost' (10061)

    What's the problem ?
    Anyone Who knows it plz help me ,
    thanks!

  2. #2
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    you need to append your current ip address to your username.

    Try mysql -h218.197.220.225 [email protected] -p
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

  3. #3
    I have thought of something.

    a short time ago , My my.ini file is like this:
    #bind-address=218.197.220.225
    I can logon by:
    mysql -uroot
    and I got (database)mysql.user(host,user) is:

    host user
    *
    localhost root
    *
    localhost yellowjim
    localhost jim

    then I changed my.ini into
    bind-address=218.197.220.225
    then I can't logon just as I said.
    Maybe the data 'host ' in Mysql.user have some problems;

    let me have a try now

    thanks very much!!

  4. #4
    After I changed my.ini like this :

    #bind-address=218.197.220.225

    It works well ag now.

    But I didn't know if I can access my db on the internet.

  5. #5
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    you won't be able to.

    once you comment out #bind-address, MySQL defaults to only allow connections from 127.0.0.1 (localhost).

    You have a few options here.

    You can have mysql listen on all interfaces/address, by changing bind-address to 0.0.0.0

    You can create a new user that is allowed access from any ip address, with a command such as:

    Code:
    GRANT ALL PRIVILEGES ON *.* TO admin@'%' IDENTIFIED BY 'somepass' WITH GRANT OPTION
    This allows admin to access the server from any ip address. Then you can bind your mysql server to your external ip, and still be able to login from the command line with that admin user.
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

  6. #6
    Thanks very much.

    I know what's the problem now.
    All is concerned to the bind-address;

  7. #7
    Join Date
    Feb 2004
    Posts
    772
    Hi,

    If you have never set a root password for MySQL, the server will not require a password at all for connecting as root.

    If you have set password only you can connect using the command what you have specified

    mysql -h218.197.220.225 -uroot -p

    You can set the password and try again .

    Regards,

    Bright
    24 / 7 Technical Support
    Bright Info Solutions

Posting Permissions

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