Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

image

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.

image_2

I can access the server via the command line

command line

and can confirm that the server appears to be active also via command line.

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:

1 and 2.

like image 541
James Krajicek Avatar asked May 23 '18 03:05

James Krajicek


1 Answers

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)

like image 154
Edwin Avatar answered Nov 15 '22 08:11

Edwin