How to decrypt password in mysql workbench

Cant connect with MYSQL workbench but can with Command line

Questions : Cant connect with MYSQL workbench but can with Command line

2022-09-17T17:35:24+00:00 2022-09-17T17:35:24+00:00

3331

This seems like a very specific issue but we anycodings_mysql are running into a problem connecting to a anycodings_mysql remote database when using MYSQL workbench. anycodings_mysql Workbench can't make the connection and anycodings_mysql gives me the error

Lost connection to MySQL server during query

I have tested the same credentials though a anycodings_mysql command line and it makes the connection anycodings_mysql without issue. In addition I tried using anycodings_mysql another Program (DBeaver) and same thing, I anycodings_mysql was able to connect without issue. So It anycodings_mysql seems like it is an issue with MYSQL anycodings_mysql workbench.

Things get a little complicated because I am anycodings_mysql connecting to ProxySql server (Which is why anycodings_mysql the port is 6033 instead of 3306) which is anycodings_mysql directing to the Server with the database on anycodings_mysql it. I've checked the install and it is anycodings_mysql working the way it's expected. But I don't anycodings_mysql understand why this would have any impact on anycodings_mysql my ability to connect from Workbench. If I anycodings_mysql can connect from the command line shouldn't anycodings_mysql I be able to connect from Workbench?

Edit: I set the logs to debug for more anycodings_mysql detailed output

This is what gets logged when i try to make anycodings_mysql a connection.

11:41:57 [DB3][SQL Editor Form]: Creating KeepAliveInterval timer...
11:41:57 [DB1][ mforms managed]: Looking up password for service: Mysql@IPADDRESS:6033, account: fuser
11:41:57 [DB1][ mforms managed]: Loading password cache
11:41:57 [DB1][ mforms managed]: Get special folder
11:41:57 [DB2][ mforms managed]: Decrypting password data
11:41:57 [DB2][ mforms managed]: Filling password cache
11:41:57 [DB1][ mforms managed]: Unloading password cache
11:41:57 [DB1][ mforms backend]: Looking up password for 'fuser'@'Mysql@IPADDRESS:6033' has succeeded
11:41:57 [DB1][ mforms managed]: Running a cancelable wait message
11:41:57 [DB3][    WQE backend]: Connecting SQL editor...
11:41:57 [DB3][       GRT task]: Sending task "execute sql queries" to dispatcher (wait)...
11:41:57 [DB1][  GRTDispatcher]: starting worker thread
11:41:57 [DB1][  GRTDispatcher]: worker thread running
11:41:57 [DB3][  GRTDispatcher]: Running task "execute sql queries"
11:41:57 [DB2][SQL Editor Form]: Notifying server state change of Mysql@IPADDRESS:6033 to not running
11:41:57 [ERR][SQL Editor Form]: SqlEditorForm: exception in do_connect method: Exception: Lost connection to MySQL server during query
11:41:57 [WRN][SQL Editor Form]: Lost connection to MySQL server during query
11:41:57 [ERR][SQL Editor Form]: Connection failed but remote admin does not seem to be available, rethrowing exception...
11:41:57 [ERR][  GRTDispatcher]: exception in grt execute_task, continuing: Exception: Lost connection to MySQL server during query
11:41:57 [DB3][  GRTDispatcher]: Task "execute sql queries" finished
11:41:57 [ERR][  GRTDispatcher]: worker: task 'execute sql queries' has failed with error:.Lost connection to MySQL server during query
11:41:57 [DB2][ mforms managed]: HUD window returned with code: 3
11:41:57 [DB2][ mforms backend]: forgetting cached password for 'fuser'@'Mysql@IPADDRESS:6033'
11:41:57 [DB2][  GRTDispatcher]: Main thread waiting for background thread to finish
11:41:57 [DB2][  GRTDispatcher]: Background thread finished
11:41:57 [ERR][SQL Editor Form]: SQL editor could not be connected: Lost connection to MySQL server during query
11:41:57 [ERR][SQL Editor Form]: Your connection attempt failed for user 'fuser' to the MySQL server at IPADDRESS:6033:
  Lost connection to MySQL server during query

Please:
1 Check that MySQL is running on address IPADDRESS
2 Check that MySQL is reachable on port 6033 (note: 3306 is the default, but this can be changed)
3 Check the user fuser has rights to connect to IPADDRESS from your address (MySQL rights define what clients can connect to the server and from which machines) 
4 Make sure you are both providing a password if needed and using the correct password for IPADDRESS connecting from the host address you're connecting from
11:41:57 [DB1][ mforms managed]: Showing an error to the user
11:41:57 [DB1][ mforms managed]: Hiding the wait message
11:41:57 [DB2][ mforms managed]: Wait message was not visible, nothing to do
11:41:57 [DB1][ mforms managed]: About to show a custom message box
11:41:57 [DB1][ mforms managed]: Creating and showing custom message box
11:41:57 [DB1][ mforms managed]: Running custom message box
11:41:58 [DB1][ mforms managed]: Custom message box closed
11:41:58 [DB2][            grt]: wb.form.showQueryConnectDialog finished in 3.96s

Any help would be greatly appreciated.

Total Answers 2

25

Answers 1 : of Cant connect with MYSQL workbench but can with Command line

In my case, my mysql database is running anycodings_mysql-workbench on docker, and when I create user using anycodings_mysql-workbench following statement: CREATE USER anycodings_mysql-workbench 'username'@'localhost' IDENTIFIED BY anycodings_mysql-workbench 'password';

this give me error when I try to connect anycodings_mysql-workbench to the database from host client using anycodings_mysql-workbench DBeaver.

I have to create a user with follow to anycodings_mysql-workbench make it work. CREATE USER 'username'@'%' anycodings_mysql-workbench IDENTIFIED BY 'password';

% is the wildcard which allow user to anycodings_mysql-workbench access database remotely from any host.

0

2022-09-17T17:35:24+00:00 2022-09-17T17:35:24+00:00Answer Link

mRahman

1

Answers 2 : of Cant connect with MYSQL workbench but can with Command line

i am here to help u. So, i have been anycodings_mysql-workbench facing these problems a year ago when i anycodings_mysql-workbench was setting up MySQL server in my anycodings_mysql-workbench development computer and faced an anycodings_mysql-workbench endless number of issues on connecting anycodings_mysql-workbench to MySQL, especially using the anycodings_mysql-workbench workbench. So, i think i am capable of anycodings_mysql-workbench answering this. So, if u are able to anycodings_mysql-workbench connect to MySQL server using anycodings_mysql-workbench Command-Line then the expected problems anycodings_mysql-workbench that might be are :

  1. Unmatched version compatibility : (if anycodings_mysql-workbench your MySQL server version is 8.0., your anycodings_mysql-workbench MySQL Shell is 8.0 but MySQL WorkBench anycodings_mysql-workbench version is not 8.0). In that case, you anycodings_mysql-workbench might need to check your versions and anycodings_mysql-workbench upgrade them to the same version.

  2. Check if MySQL workbench has closed an anycodings_mysql-workbench existing connecting and is trying a new anycodings_mysql-workbench connection : (try to close your existing anycodings_mysql-workbench connection and try to open a new anycodings_mysql-workbench connection with login credentials)

  3. Check if password is correct: Sometimes, anycodings_mysql-workbench password gets auto changed in workbench anycodings_mysql-workbench due to its stored cache

  4. Lastly, check the connection anycodings_mysql-workbench type(TCP/ssh) : Choose suitable anycodings_mysql-workbench connection type

  5. Sorry for you but you might need to take anycodings_mysql-workbench a look at your loadbalancer anycodings_mysql-workbench configuration and permissions for your anycodings_mysql-workbench port accessibility

0

2022-09-17T17:35:24+00:00 2022-09-17T17:35:24+00:00Answer Link

miraj

How do I find my MySQL password in workbench?

Reset MySQL Root Password from PowerShell.
Stop the MySQL service and process. ... .
Create a temporary init file. ... .
Get the location of the MySQL defaults-file. ... .
Change dir to MySQL bin. ... .
Run mysqld with the password reset. ... .
Kill and Restart MySQLD (in a new PowerShell prompt). ... .
Return to the initial prompt and test..

Where does MySQL Workbench store passwords?

The vault provides a convenient secure storage for passwords used to access MySQL servers. By using the vault, you need not enter credentials every time MySQL Workbench attempts to connect to a server. The host name is used for storing password information.

How can I recover MySQL password?

In order to recover the password, you simply have to follow these steps: Stop the MySQL server process with the command sudo service mysql stop. Start the MySQL server with the command sudo mysqld_safe –skip-grant-tables –skip-networking & Connect to the MySQL server as the root user with the command mysql -u root.

How do I change my encrypted password in MySQL?

Please follow the below mentioned steps to change a User Password for MySQL Database:.
Step 1: Open MySQL Console or use PhpMyAdmin..
Step 2: Log-in by typing at the Shell prompt [Using CLI] ... .
Step 3: Type the root password. ... .
Step 4: mysql>show databases; ... .
Step 5: mysql>use mysql; ... .
Step 6: mysql>show tables;.