Locked out of MYSQL and PLESK 7 due to an incorrect allowed host setting in MYSQL on 'admin'

Posted on 2004-11-26
Last Modified: 2008-01-09
Here's the deal.... I have a default Plesk install at my host provider on *nix. I use Navicat 2004 to connect to my MYSQL DB. Since the deafult admin MYSQL login only allows a login from host 'localhost', I used phpMyadmin to set the allowed 'admin' login host to '*', this change has completly locked my out of EVERYTHING!!! Plesk, phpMYAdmin, Navicat.. EVERYTHING!!! Here are my errors:

Plesk login: Unable to connect to database: saved admin password is incorrect. 0: /usr/local/psa/admin/auto_prepend/auth.php3:2 psaerror(string "Unable to connect to database: saved admin password is incorrect.")


phpMyAdmin: phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in and make sure that they correspond to the information given by the administrator of the MySQL server.


MySQL said:
#1045 - Access denied for user: 'admin@localhost' (Using password: YES)


I am unable to reboot my server. I know the problem is with the allowed "host" setting. I know the problem lies in how I tried to set the host to allow from '*'. So what I need to do is fix that setting so I can connect again. I am still able to connect via SSH using puTTY. I have root access. I believe I need to edit a mySQL config file to ignore grant tables and restart the mySQL service. I do not know how to do this. I need help, without help I'm sure I'll pay several hundred dollars to pay the support team at my ISP. Please help!!!
Question by:blaines
    LVL 12

    Accepted Solution

    If you start the server with the option:
    you will be able to connect.

    You can also put a line into your config file (

    After you are connected, set the host value for the user to '%'.  '%' is the wildcard character in MySQL.

    Hope this helps!

    LVL 3

    Author Comment

    How do I start the server with --skip-grant-tables? Or how do I edit the config file. I'm new to *nix.
    LVL 3

    Author Comment

    Okay, I figured out how to edit the my.cnf (vi my.cnf) and how to restart MYSQL via SSH (/etc/init.d/mysqld restart). I was unable to modify the allowed host via the "priviledges" in phpmyadmin (it kept returning an "unknown command"), however, I was able to browse to the mysql database and modify the 'admin' user in the 'users' table. It appears everything is working again. Thanks for all your help.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
    As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now