• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Got a problem connecting to databases on mysql workbench?

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using mac and I installed Mariadb via  terminal. What are the steps to identify the problem so you can help me easier?
 
martin codey
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 10.4.10-MariaDB Homebrew
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8mb4
Db     characterset: utf8mb4
Client characterset: utf8
Conn.  characterset: utf8
UNIX socket: /tmp/mysql.sock
Uptime: 1 day 11 min 46 sec
 
Marshal
Posts: 6616
177
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the full error message?
 
martin codey
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your connection attempt failed for user 'root' to the MySQL server at localhost:3306:
 Access denied for user 'root'@'localhost'

Please:
1 Check that MySQL is running on address localhost
2 Check that MySQL is reachable on port 3306 (note: 3306 is the default, but this can be changed)
3 Check the user 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
 
Saloon Keeper
Posts: 21563
146
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Virtually certain that it's case 3 or 4. Your MySQL or MariaDB server comes with very tight security that limits what IP addresses a user can connect from and the password that must be supplied with that userid. If you do not supply the proper password and/or that user is not approved to access from that host (not likely to be a problem for root from localhost), then connection will be rejected.

If you don't know the root password, there's a way to start up MySQL in insecure mode where you can set the root password to a known good value that you can then use to connect with.
 
martin codey
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont know my root password, I thought about reinstall of mariadb but I can try your way, whats the steps?
 
Tim Holloway
Saloon Keeper
Posts: 21563
146
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It varies depending on what OS you are using. Google "MySQL lost root password" and you should find a step-by-step process, though.
 
martin codey
Greenhorn
Posts: 23
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the help.


If you read this and struggle as I did maybe these tutorials can help as they helped me:
install mariadb
install homebrew
Step of reseting the password for root
 
Ranch Hand
Posts: 94
1
MyEclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

martin codey wrote:Thank you for the help.


If you read this and struggle as I did maybe these tutorials can help as they helped me:



This is a great tutorial. I worked all the way through it. It was a lot of fun and it is a really neat, practical program when you finish.
You can customize it, tinker around with it and make it do things that you want to do with it.
 
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!