Problem with mysql workbench and xampp server - mysql

I am trying to create a project with mysql. For the past two days I had been using XAMPP server for the mysql server and mysql workbench to use it and it has been working perfectly. Today after having to restart my pc for a windows update, when I turned on the XAMPP mysql server and tried going to my connection in mysql workbench, mysql workbench is giving me an error
Could not connect; Server may not be running Message: Lost connection to mysql server at 'waiting for initial communication packet'. system error 10060
I have tried multiple solutions; Changing the port of the mysql server. Using a different username and password, the root username. And have tried restarting my computer multiple times to fix the problem. If any more information is needed to find the problem I will update this question to provide more information.
UPDATE 1:
I left my laptop running and when I returned the workbench had connected successfully. I believe the problem comes from restarting the pc as the day after I posted this question I restarted my pc to fix a problem and I am currently having the same situation.

Maybe the problem is the Windows Firewall or the Antivirus.
If the server is running all the time and the service not stop, the port is blocked.
Check if the default port is Listening:
C:\Windows\System32>netstat -an |find "3306"
Or you can use the Microsoft Tool PortQry.exe download from:
https://www.microsoft.com/en-us/download/details.aspx?id=17148
Example of use:
C:\PortQryV2>PortQry.exe -n 127.0.0.1 -e 3306
Querying target system called:
127.0.0.1
Attempting to resolve IP address to a name...
IP address resolved to WF-SA02
querying...
TCP port 3306 (unknown service): LISTENING
C:\PortQryV2>

Might be an SSL problem. The problem is: XAMPP does not use SSL and MySQL Workbench uses SSL as a default setting.
You can select "If available" in the Use SSL dropdown box of the SSL tab of the connection pane. Use the tool icon in the startup window to edit already existing connections. Works in MySQL Workbench 8.0.28+

Related

Error Connecting to Remote MySQL server hosted on Ubuntu from Windows

When attempting to connect to remote MySQL server from my Windows machine using MySQL workbench - I get an error about connecting to localhost (unsure where the software is picking up localhost). However when I attempt to connect through an SSH tunnel it connects just fine (I cannot use this for the software I am creating though)
when I run netstat on the server:
netstat command
...(more entries)
the bind address has been altered in mariadb and mysql configs. if there are any more configs people would like to see to help with solution please let me know. I have also set up the user in mysql to allow remote privileges:
mysql users
I am pretty confused.

can not connect to mariadb server using dbeaver

I have installed and running MariaDB server on a raspberry 4. I am trying to connect with Dbeaver but i am unsuccessful.
Hosting db details:
Raspbian: GNU/Linux 10 (buster)
mariadb: Server version: 10.3.34-MariaDB-0+deb10u1 Raspbian 10
Client access:
Dbeaver: Version 22.1.5.202208211008
phpmyadmin
Now as you see, I have installed phpmyadmin as well and I can successfully connect to host. Also I can ssh remote connect.
However Dbeaver refuses to connect and times out.
What I have tried so far:
I have configured mariadb in 50-server.cnf to bind to 0.0.0.0
I have added an admin user account in mysql with all rights and is stated as admin#192.168.1.x, where the ip is the remote pc's ip with the Dbeaver.
I have tried adding also "admin"#"%"
What should I troubleshoot next?
What worked for me, after some tries, was that I went to Dbeaver connection settings/SSH/ and ticked the use SSH tunnel.In Settings I filled the server details and pi user and password.
Testing and connection was successful after some questions/answers about creating a key and a couple of directories.
I wend back to the connection and I was able to expand the connection view tree with Table/Views/etc
I am not sure why I needed the SSH tunnel to connect. It was not stated to any tutorial I used. Maybe someone in the community can help with this.

Wamp mysql : ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

I installed wampserver on my xp machine month ago.. Now when I try to connect to mysql via phpmyadmin or mysql console I get the error :
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost'
(10061)
Wamp icon in the tray is green meaning it's running ok.. I checked for mysql service and it's running and using the port 3306 .. I turned off the firewall.. I tried everything and it's not working.. I eventually uninstalled wamp totally and removed all its files and re-installed it again and same error.. When I try to telnet localhost 3306 it doesn't connect and I get the error :
Could not open connection to the host on port 3306: connect failed
I searched the web for hours, but didn't find any working solution. It seems that many people are having the same problem and most of them didn't find the solution.
Ok .. searching the internet for more several hours I've found one little clue that actually fixed my problem.
When I type netstat -a I get a list of active ports including 3306 (the one mysql uses). The Foreign Address column for some ports is 0.0.0.0.0 but for 3306 is [::]:0. I'm not a network guy but it turned out that it means it's a IPv6 port and it should be IPv4.
Adding the following line in the file my.ini under [mysqld] and restarting the service solved the problem.
bind-address=127.0.0.1
Note
My wamp version is 2.4 and mysql version is 5.6.12 running under win XP.
my.ini file for me is located at c:\wamp\bin\mysql\mysql5.6.12.
Hope this helps who suffered my pain.
In my.ini there is - for example -the entry
# Secure File Priv.
secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.7/Uploads"
If this path is not (further) existing, mysql cannot be started.
You have then to put an existing path.
I also did some research on my side I reconfigure the sql parameters then in the type and networking section you have to uncheck the open windows button Firewall ports for network access then you have to press next until closing without anything modify other

problems connecting to port 3306 mysql workbench with XAMPP

I'm trying to learn the apache / mysql / php stack bundled with XAMPP. I can't connect to the MySQL server using the MySQL workbench:
Your connection attempt failed for user 'root' from your host to server at localhost:3306: Can't connect to MySQL server on '127.0.0.1' (61)
Thinking it's a port problem, I check the port directly in Terminal with the command telnet 3306:
telnet: connect to address 127.0.0.1: Connection refused
Obviously the problem isn't with the Workbench, but something to do with the port connection itself.
I'm using:
OS 10.8 Mountain Lion
XAMPP 1.7.3
MySQL workbench 5.2.47
Sorry all, I'm posting my own question and answer. I had this problem and it nearly destroyed me because I could not find the correct answer anywhere on the interwebz. I finally overcame it, and wanted to post my findings in case it helps another befuddled traveler.
It turns out when you install XAMPP and choose to run the security routines, it automatically turns on a setting in the MySQL preferences to block connections on port 3306 from localhost. To fix this, open my.cnf in the xampp folder xamppfiles/etc. Look for the setting "skip-networking" which tells mySQL to block the port 3306. Comment this out by adding a pound sign so it is "#skip-networking". Now, the telnet command should work, and you should be able to use the Workbench.
Hope this is helpful for somebody!If it fixes your problem, give me a shout at #mrcheeks3185.
I faced same problem but I solved it.
I changed the MySQL workbench port to 3307 in the file below
C:\ProgramData\MySQL\MySQL Server 5.7\my.ini
and keep the default port 3306 for XAMPP
for mac you should create only a user with password and grant access(in my case a I use root with password) and turn on ip address and use that address to connect with a client like navcat or workbench I use XAMPP 7.3
ip address network given by XAMPP
connection config in navcat
test connection
I found that file after mount the image disk created for xampp, there you can find new_disc_mounted/etc/my.cnf
If you do not have my.cnf you can first go to xampp->mysql->bin->my.ini, copy
the contents of the file, next create my.cnf (in the bin folder) and paste the content to the file you just created.
This works for me. I had the same problem. Now I can use both Xampp and Workbench on one PC.
There is an issue: when you start workbench you get some warning that some features may not work properly since database is not fully compatible.
If changing ports won't work. What I did, I just make sure both XAMPP and MySQL Workbench don't start the server at the same time. Just go to MySQL Workbench, Select Server > Startup/Shutdown > Shutdown.
its due to different version of xampp, open log file and check last status of mysql there is showing error find it or remark/change it
Actually XAMPP and MySQL workBench might be using same port an are conflicting "3306" in so you are getting that error
Please try changing the workBench's default port number to other number and try again

Mysql Workbench error "system error:61"

I have mysql installed several months ago. However I do remember using mysql workbench successfully at one point of time. Today I try launching it and get following error
Lost connection to MySQL server at 'reading initial communication packet', system error: 61
open /etc/mysql/my.cnf in a text editor and try changing:
bind-address = 127.0.0.1
to
#bind-address = 127.0.0.1
and then restart MySQL.
Try using the connection method: Local Socket/Pipe.
If you are trying to use the MySQL Workbench and connect through an SSH tunnel, you will get this error when your SSH connection does not complete successfully (e.g. improper host, password, key file, etc)
A good way to trouble shoot this is to separately test the the ssh connection from the machine you are trying to connect from and establish that you can do so succesfully.
I came across the same problem.I fix this below:
3306 port may be occupied by other process, so mysql change the port to 3307(or nearly other port 3308...).So when you connect,change the port to 3307 and try