0

I have installed Raspbian 2.4.4 on my Raspberry Pi 3 Model B. I have installed MySQL Server, client, Workbench along with monodevelop, nodejs Apache 2 and php7.0 along with some C/C++ packages needed for my application.

However I am unable to log in from my MySQL Workbench to my MySQL Server. I get the following error :

Cannot Connect to Database Server
Your connection attempt failed for user 'root' from your host to server at localhost:3306:
  Access denied for user 'root'@'localhost'

Please:
1 Check that mysql is running on server localhost
2 Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed)
3 Check the root has rights to connect to localhost 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 localhost connecting from the host address you're connecting from

I referred couple of articles like can't login as mysql user root from normal user account and Cannot connect to Database server (mysql workbench). I attempted to enter MySQL command prompt but it tends to open MariaDB command prompt. As far as I know I haven't installed anything pertaining to Maria DB.

pi@raspberrypi:~ $ sudo mysql -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 17
Server version: 10.1.23-MariaDB-9+deb9u1 Raspbian 9.0

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 
James Z
  • 12,209
  • 10
  • 24
  • 44
Dark Sorrow
  • 1,681
  • 14
  • 37
  • 1
    Are you sure you installed (and ran) the workbench on your pi? Did you maybe install the mysql server there, and started workbench on your pc? In that case, `localhost` refers to your pc, not the pi, and it's clear that workbench cannot find MySQL on the pc, as it is on the pi. You have to use pis ip. You may also want to look [here](https://stackoverflow.com/q/18733802/6248528). Also, MariaDB is a replacement for MySQL on linux systems, so that is probably normal. – Solarflare Oct 02 '17 at 22:20
  • I have connected and using Raspberry Pi 3 as my native machine. I have connected it to HDMI monitor and I am having dedicated keyboard and mouse for the same. I am also getting an compatibility message when I am opening workbench. – Dark Sorrow Oct 03 '17 at 03:57
  • Following the first link I was able to login in via workbench but get an compatibility warning. Looking on-line I can see this may be issue with Raspbian Stretch. – Dark Sorrow Oct 03 '17 at 04:04
  • Are you saying that you got MySQL Workbench running on a Raspi? How did you compile this? – Mike Lischke Oct 03 '17 at 06:52
  • MySQL Workbench is available in Raspbian repository. – Dark Sorrow Oct 03 '17 at 09:24

0 Answers0