unable to connect to mysql running inside WSL - mysql

Getting the above error while connecting to mysql server running on WSL. That's weird
because I have done this with postgresql and it worked fine.
But if on the WSL command prompt I type mysql -u root I am able to connect to it.
The Dbeaver or any other window client application or any java program is also giving error

Related

Can't connect mysql workbench to mysql even though I can connect normally through the terminal

I recently installed mysql and mysql workbench on my manjaro machine. As for mysql itself, it works perfectly. I can start the service, connect using terminal and do my usual work without any trouble.
The problem is that mysql workbench can't, for the life of me, connect to mysql. Always returning the same your connection attempt failed for user 'root' to the mysql server at 127.0.0.1:3306: SSL connection error: SSL is required but the server doesn't support it error.
Even when I try the Rescan servers option on mysql workbench it returns No servers were found.

MySQL.prefPane showing stop status

I have installed mysql using dmg from mysql website.
mysql-8.0.23-macos10.15-x86_64.pkg
package version: mysql-8.0.23-macos10.15-x86_64.dmg
I have connected to localhost server using: mysql connect -h127.0.0.1 -uroot
I am successfully connected and able to run operation/queries.
But not able to connect through django project. I suspect it is due to server not running. I am unable to understand when server is not running how i am able to connect from terminal.
UPDATE:
After reading answer on dba exchange I realised it might be because I
ran kill to stop mysql server.

New MySQL Workbench Install (Will not connect to root) Ubuntu 18.04

My newly installed MySQL workbench is refusing to connect to the root of my newly installed MySQL Community Server. Whenever I attempt to access "Local Instance 3306" (the default MySQL connection) I get the following error message.
This error message does change if I open "Local Instance 3306" via the "edit connection" tab and then "test connection". I'll get a different but similar error code.
I can access the server via the command line
and can confirm that the server appears to be active also via command line.
It is a fresh install of MySQLCommunity Server and MySQL Workbench running on Ubuntu 18.04 with only one user account. I installed both the server and workbench using apt and used the guide created by DevAnswers.co here.
After installing the server and workbench I attempted to access the server using the workbench BEFORE I ran the sudo mysql_secure_installation command. I got the same two errors. I then ran the secure installation command and assigned a password which I do remember and did input into the password field of mySQL workbench albeit with the same results. I am very new to mySQL and databases and am trying to install mySQL to learn how to use SQL. I'd appreciate any help you all can provide in resolving this issue.
Additional pictures:
and .
I suspect that you just need to follow this short guide to set a root password:
https://whs-dot-hk.github.io/ubuntu-18.04/install-mysql.html
After setting a root password, you should be able to connect to mysql-workbench.
In short the root user in MySQL is authenticated using an auth socket, not a password. That's what's giving the message you're getting in the first screenshot.
(I'm assuming this is for a development project, for a production project you should keep the default config)

Cannot connect to MySQL server via command line while Workbench can work

I have a MySQL server running on Windows 7 (technically on a virtual machine but I don't think that matters). I have configured everything and it seemed fine at first. I tried to connect to the server via command line and it worked. Then I tried to connect to it via Workbench and succeeded again. However, I can no longer connect to the server with command prompt ever since that. The client machine is in a different sub-network.
My command is like:
mysql -host HOST_IP -P PORT -uUSER -pPASSWORD
And it returns:
ERROR 2005 (HY000): Unknown MySQL server host 'ost' (0)
The problem is that while I can connect to the server via Workbench, the command line just won't work. It all happens after I connected with Workbench. Does it has anything to do with Workbench? Or is caused by other issues?

Setting up MySQL server on OSX 10.7 (Lion) using Homebrew

I have successfully installed MySQL using Homebrew. However, whenever I type the command mysql I receive this error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I suspect this is a permission problem, as I have confirmed my system is looking for MySQL in the right location. However, I a novice with Unix(OSX) and don't know how to rectify the problem.
I am using OSX 10.7 (Lion)
which mysql produces /usr/local/bin/mysql
When you type 'mysql' you are running the MySQL client. The client needs to communicate with the server. If you simply run 'mysql' without any argument it assumes you are trying to connect to a mysql server that is located on 'localhost' using the user name as the user you are running the command as and without a password.
From the error it seems your server is not running yet. Start it by typing:
mysql.server start