remote host is not allowed to connect to this mysql server

    Question by:



    Please kindly assist how can we remotly login to mysql ?

    running on fedora core 3 (fresh install) everything is default.

    how can we change the root (mysql) password? are there commands we need to run to get mysql setup and ready to rock n roll?  :)

    I'm on a windows client trying to connect to mysql, error mesasge:remote host is not allowed to connect to this mysql server



    Verified Answer?

    The member who asked this question verified this comment provided the solution that solved their problem.

    by:Posted on 2005-10-01 at 06:06:11ID: 14998377


    Identical to above...

    To change the password(for root or any user)...

    on Linux machine..

    [ushastry@mmkserv test]#mysqladmin -uUserName -pOldPassword 'NewPassword'

    ///remote host is not allowed to connect to this mysql server

    {From DOCS}
    If the following error occurs when you try to connect from a host other than the one on which the MySQL server is running, it means that there is no row in the user table with a Host value that matches the client host:

    Host ... is not allowed to connect to this MySQL server

    You can fix this by setting up an account for the combination of client hostname and username that you are using when trying to connect.

    If you do not know the IP number or hostname of the machine from which you are connecting, you should put a row with '%' as the Host column value in the user table. After trying to connect from the client machine, use a SELECT USER() query to see how you really did connect. (Then change the '%' in the user table row to the actual hostname that shows up in the log. Otherwise, your system is left insecure because it allows connections from any host for the given username.)

    Login to MySQL Server(host on which MySQL Server is running)

    [root@mmkserv test]# mysql -usqladmin -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 4 to server version: 4.0.20-log

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> GRANT ALL ON *.* TO 'EdwardPeter'@'%' IDENTIFIED BY '123';
    Query OK, 0 rows affected (0.14 sec)

    Query OK, 0 rows affected (0.16 sec)

    mysql> \q

    From windows machine...

    C:\mysql\bin\>mysql -hhostname -uEdwardPeter -p123

    This content is available to Experts Exchange members

    See the answer now
    with your Free 30 Day Trial

    Get unlimited access to solutions & experts

    • 4,169,477 solved questions
    • 3,805 articles & videos
    • 15,413 tech experts

    Get Access Now

    Ask Your Tech Question. Get Expert Solutions.We will email you when an expert has commented on your question.

    We will never share this with anyone. Privacy Policy Terms of Use

    Select topics

    You may select up to five topics.

    Top Expert Contributor

    Essential articles and videos from the Experts

    More valuable questions with Expert answers


    RELATED TOPICS view all topics

    1. PHP
    2. Databases
    3. Query Syntax
    4. MS SQL Server
    5. Linux
    6. Apache Web Server
    7. MS SQL Server 2005
    8. Web Development
    9. MS Access
    10. MS SQL Server 2008