I can't establish a database connection from MySQL client Workbench through SSH. If I click Test Connection I get the error: ERROR local variable 'chan' referenced before assignment in the first step.
However I was able to connect from MySQL server through the command line, via SSH. I was also able to connect to my local database with Workbench. I am using Ubuntu with KDE 14.10 and the problem started with the update, so I guess it has to do with that, but I don't know how. Please let me know if you'd like further information.
Thank you in advance,
PS I saw a similar problem without a solution here.
Here a solution to fix this issue under Debian/Ubuntu:
1 First, close Mysql Workbench!
2 Apply the patch:
sudo cd /usr/lib/mysql-workbench/
sudo wget https://launchpadlibrarian.net/189450207/paramiko.patch
sudo patch -p1 < paramiko.patch
3 Start Mysql Workbench, it's now working!
If you use python 2.x, try using python3?
This bug is probably related: http://bugs.mysql.com/bug.php?id=74960
Edit: confirmed, I have tried with python 2.x and have this error into mysql/workbench/log/wb.log:
5:35:38 [INF][wb_admin_control.py:query_server_installation_info:767]: Currently connected to MySQL server version 'unknown', conn status = None, active plugins = []
15:35:38 [ERR][sshtunnel.py:notify_exception_error:233]: Traceback (most recent call last):
File "/usr/share/mysql-workbench/sshtunnel.py", line 315, in accept_client
sshchan = transport.open_channel('direct-tcpip', self._target, local_sock.getpeername())
File "/usr/lib/mysql-workbench/modules/wb_admin_ssh.py", line 116, in wba_open_channel
raise e
EOFError
15:35:38 [ERR][wb_admin_control.py:server_polling_thread:492]: Error creating SQL connection for monitoring: MySQLError("Lost connection to MySQL server at 'reading initial communication packet', system error: 0 (code 2013)",)
15:35:56 [INF][ base library]: Notification GNFocusChanged is not registered
Related
When attempting to start the mysql and apache services from the Bitnami Wamp stack manager i get the following error.
Starting MySQL Database... Exit code: 1 Stdout:
Stderr: Unknown error starting mysql
I have been able to start the mysql server manually by navigating to the mysql/bin folder and running mysqld, but this is a less than desirable solution.
I tried running the net start "wampstackMySQL" command in cmd, which i found in the mysql/scripts/servicesrun.bat file, but i get the following error.
System error 1058 has occurred.
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
In the services monitor (windows tool) i find both apache and mysql, but all the options for them are greyed out.
There seems to be an issue with the mysql and apache services, but i am unable to figure out what and how to solve this. Anyone have any ideas?
I just installed MySQL using the community installer in hopes of running a server and creating a database for use in my C++ program. I installed the Server, Workbench, Shell, Router, and Connector/C++ before running the Workbench. Everything appeared to be working properly. The server was running and I was able to connect to it in my C++ program, so I started to create my database, when the power suddenly went out before I could finish.
Once the power came back on and my PC rebooted, I reopened the MySQL Workbench to find that I was unable to start the server. I clicked the 'Start Server' button several times, but was met with the error "Could not start server: argument 2: <class 'TypeError'>: wrong type".
I tried uninstalling and reinstalling everything, but when I reopened the MySQL Workbench after the installation was finished, I was met with the same error. Does anyone know what could have possibly happened?
EDIT: After uninstalling everything and deleting every trace of MySQL from my computer, I was able to reinstall everything and get the server running again. However now I'm getting the same error when I try to STOP the server: "Could not stop server: argument 2: <class 'TypeError'>: wrong type". What is going on????
I have the same issue and I've installed the developers default version of the MySQL-Workbench with the installer. I recently updated my hardware and reinstalled Windows 10, maybe it's a bug of Windows 20H2 or of the Workbench itself?
I found a workaround: Use the CMD or the Powershell to start or stop the MySQL-Service of the server. In my case, it has the name MySQL80. Take a look in your services of windows when the commands below are not working.
Use net start MySQL80 to start the server.
Use net stop MySQL80 to stop the server.
Remember to open the CMD or the Powershell as Administrator. I think this issue is a bug of the workbench itself because the service is start and stopable with the command line.
The first thing to try is to run mysqld --console from the MySQL server bin folder. That should give you more specific error messages.
In my case, the data folder was missing. I needed to run one of the mysqld --initialize... commands; see https://dev.mysql.com/doc/refman/8.0/en/data-directory-initialization.html. On Windows, running mysqld --initialize... --console helps to see what server is doing.
Once that's done, you can run mysqld --console again to see if it starts successfully.
I solved this problem as follows. currently my.ini file encoding is UTF-8. you must change to ANSI.
I've done numerous suggestions and none work. Except this one:
Download and run the latest MySQL Installer.
A window will appear showing your installed services:
MySQL Server
MySQL Workbench
MySQL Shell
etc.
Click "reconfigure" on the MySQL Server and set up the server as you did previously.
My specific server setup was:
Type and Networking: leave as default
Authentication Method: (RECCOMENDED)
Accounts and Roles: Enter and check mysql password
Windows Service: Uncheck 'configure as a service'
Apply configuration: Execute
Server should be up and running.
in my case I had solve this way
Go to RUN----->Services.msc----->MYSQL80---->start server
hope this way problem will solved.
On my Windows installation the account the service runs under did not have (security) permissions to the non-existing data directory. After creating the data directory which was "Program Files\MySQL\MySQL Server 8.0\data" and setting permissions everything worked with a "net start mysql80".
Here are the steps I took to resolve my MySQL Workbench 8.0.23 issue
that resulted in an inability to start & stop the MySQL server process (mysqld)
from MySQL Workbench (O/S=Windows only answer)...
Close MySQL Workbench
In C:\Users<Your account>\AppData\Roaming\MySQL\Workbench\serverinstances.xml:
Replaced:
sc start MySQL80
sc stop MySQL80
With:
net start MySQL80
net stop MySQL80
Notes:
My mysqld service was installed w/ the name='MySQL80', replace/match this value to your actual service name.
My mysqld service was installed using a 'Network Service' account, verify that your service is also running as a network service before using the 'net' commands
Setup MySQLWorkbench CE 8.0 executable to 'Run As Administrator' so that the commands to start and stop the service run as an administrator:
In File Explorer find the MySQLWorkbench.exe executable:
E.g: C:\Program Files\MySQL\MySQL Workbench 8.0\MySQLWorkbench.exe
In File Explorer, Select the exe, Right click on the exe, select 'Properties', select
'Compatibility' tab: specify 'Run This Program As An Administrator'
Start MySQL Workbench
Attempt to start or stop the MySql server process (mysqld)
Notes:
O/S = Windows 10 specific
MySQL & MySQL Workbench were installed via the MySQL CE 8.0.23 installer
Installed MySQL 8.0.23 as an upgrade from 5.7 to 8.0.23
If this error while starting/connecting the server from Workbench then you need to Go Start->MYsql workbench Installation Click.
Open and reconfigure the MySQL server with port number and Create Root user Password.
Finish this Re-configuration then open workbench. Provide the Port number and Credentials and connect to DB.
In window you may use task manager
just open task manager by search "task manager" in window search
Go to service and find Mysql (name depending on the name saved when initializing mysql server at first time)
Right click it and click start to start server or stop to stop server
I'm using http://laragon.org for my server
I got a problem yesterday my apps cannot connect to mysql and give me this error message
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost'
(10061 "Unknown Error").
and I tried to run mysql -v but got same error. I'm using :
OS Windows 10 64bit
Laragon v0.7
No antivirus running
No others server running (this is the only server in the pc)
I'm searching everywhere but the answer is to start MySQL service, but I don't find any MySQL service in services.msc (I read on their site if Laragon won't add anything to the System Path Variable.
But, you are freely to use composer, artisan, mysql, mysqldump, httpd, redis-cli, ... in Laragon' shell)
and in their control panel status MySQL 10.0.20 started.. i tried to restart all service and pc but still got the problem
anyone know how to fix this problem ?
UPDATE : mysql -V is working, just need to uppercase -v, but still cannot connect to my MySQL Database
You're running a very old version of Laragon.
Try installing Laragon 0.9 151004, I believe it helps.
From the website, it appears that:
No Windows Services
Laragon manage other servers by its own optimal service manager.
This provides a reason as to why you couldn't find MySQL service in services.msc. Can you check the interface itself (if you can not find the laragon service itself in services.msc) and check whether MySQL service is running or not?
Additionally, look into laragon's installation directory for a logs file. Close and restart laragon if everything fails.
This question may be a duplicate. I searched similar question, but the solutions of those problems did not help me fix the problem.
When I open mysql cmd line It asks me for password. Anyhow i did not set password to the server during configuration. So I just hit ENTER when it asks for password(it works on my Classmates' PCs), after I do that, an error message is displayed: error 2003(HY000) Can't connect to MySQL server on 'localhost' (10061).
So I thought there must be some problem with the windows service for mysql. I found out that the service was not running, so I tried to manually start the service, When I did so I got an error message: windows could not start the mysql service on local computer Error:193: 0xc1.
What Can I do...
Check the windows service for mysql running for not.If not running start it from services as administrator.
You can resolve this in a better way by starting service {mysql56} from command line as Administrator
net start mysql56
Second method
Check path to execute also check in registry also From Run type
services.msc
Select mysql56(mysqlxx) right click and check
properties and note down path to execute
From Run type regedit and
navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
Select the mysql service (mysqlxx) and check its ImagePath value
data as same as path to execute
If it is not change it
My MySQL Workbench is not connecting to my local host, and I cannot figure out why exactly it is reacting like this. It just started doing this one day, and randomly it will give me access although it says it is still "unknown", but I am tired of this and would like to fix it.
Since this website reqires that I have a "10" reputation to post images, I will have to describe it.
On the Startup/Shutdown tab in the administration page, it says:
The database server instance is unknown. --The "Start Server" button is faded out so that I cannot click it.
Startup Message Log
2013-07-11 08:57:51 - Workbench will use cmd shell commands to start/stop this instance
2013-07-11 08:57:51 - Status check of service 'MySQL' returned error: Not found
2013-07-11 08:57:51 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:00:55 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:00:55 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:02:01 - Status check of service 'MySQL' returned error: Not found
Then on the server status tab in the administration page, it says:
Name: mysqld#localhost
host: localhost
server:unknown
status: unknown
Connection
There is no connection to the MySQL server. This functionality requires an established connection to a running MySQL server to work.
If anyone can help out, that would be great!
Thanks
I had this problem on my Windows 8.1 machine and it turned out to be problems with the file permissions.
To repair it I went into the folder at "C:\Program Files\MySQL\MySQL Server 5.6" and right clicked on the "data" folder and selected properties. Clicked the security tab and clicked edit. From there click the ADD button then the ADVANCED button and finally the FIND NOW button. In mine I added users, administrators, and "ALL APPLICATION PACKAGES". I granted full control to the users that were already listed for the data folder and the users, administrators, and ALL APPLICATION PACKAGES.
After the permissions were repaired I opened a command prompt as administrator and changed to the "C:\Program Files\MySQL\MySQL Server 5.6\bin" directory cd "C:\Program Files\MySQL\MySQL Server 5.6\bin". From there you can execute mysqld --install which installs the MySQL service.
More information about installing the mysql service on windows can be found at http://dev.mysql.com/doc/refman/5.0/en/windows-start-service.html
[edit] Please note that if you are using a different version of MySQL than the path to the MySQL data directory and bin directory may be different on your windows machine.
The error message says it: the service with the name MySQL cannot be found. So probably your MySQL service has a different name? Do you have a service at all? Starting mysql manually from the bin folder is just that: manual. There is no service involved, hence WB cannot manipulate the run state.
When you install MySQL with the MySQL installer you have everything in place within a couple minutes and it works right from the start.
So first check if you have a service running for your MySQL server and stop starting it manually. If there's a service take its name and enter it in the Windows Service Name field of the configuration manager:
Note that MySQL Workbench can manage your server only if it is installed as a Windows service.
I had this problem on my Windows 8.1, and I solved it updating my workbench to Version6 with "mysql-installer-web-community-5.6.16.0.msi" from the official page of mysql
I have found reinstalling all MySQL products a better alternative, because some of the solutions on the internet will make another instance of your mysql server along with mysql56, which might mess things up for a beginner.
Remember to keep database files and configuration undeleted during the reinstallation.
I had problem on MAC.
Please ensure you have installed mysql and its running. Because installing only workbench app, will not install mysql service. First install mysql and run the service.
In my case, I tried with brew
brew install mysql // installing mysql
brew services restart mysql // restart service after installing
mysql --version // check version