skip to Main Content

I’ve a CentOS 5 Plesk server.

I have an updated version of phpMyAdmin in a public folder and if I try to login with my admin details (the root user of the entire MySQL server) everything works fine.

If I try to login with the same user using MySQL Workbench it says:

Failed to Connecto to MySQL at <myip>:3306 with user admin

Access denied for user
'admin'@'<myisphost>.fastwebnet.it' (using password: YES)

I’ve tried other users and they works if I use the old authentication protocol. So I’ve tried with this option but the error is the same.

Connecting to MySQL from SSH terminal everything works fine, looks like the problem is only with Workbench…
Any help?

2

Answers


  1. First variant:

    Looks like your admin acount has been limited to access only from localhost.
    Login to MySQL using mysql command from ssh (using your root credentials) and run this command:

    GRANT ALL PRIVILEGES ON *.* TO 'admin'@'<myisphost>.fastwebnet.it' WITH GRANT OPTION;
    

    This will allow you to connect from your host (<myisphost>.fastwebnet.it).

    To check your access privileges:

     SHOW GRANTS;
    

    If you’ll have something like this:

    GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' IDENTIFIED BY PASSWORD '...'
    

    than you have access only from localhost (machine where MySQL server is running on).

    also you can check privileges using this command:

    select user,host from mysql.user;
    

    Second variant:

    Second one variant is to use ssh-tunnel.

    1. In MySQL Workbench when creating new connection select
      connection method as “Standart TCP/IP over SSH” option.
    2. Fill in your SSH/MySQL credintials. Please note to use your MySQL access options as for localhost.

    Something like this:

    enter image description here

    Login or Signup to reply.
  2. In my case, I just closed all the current tabs in Workbench and logged in again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search