Cannot connect to mysql 8 on osx

I am getting the error “Access denied for user ‘root’@‘localhost’ (using password: YES)”

I have verified connection from mysql client works fine and I also use the same credentials to connect from my Ruby on Rails apps. The root user has permission to connect to localhost. I do have special characters like !@#$ in my password, if that makes any difference.

I am a new Wappler user and I got the subscription for basic account. What else and I doing wrong here?

Does the basic plan include database support? I thought that was only included in Pro.

1 Like

It does not. Would that be the reason? I thought for new users there is a 7 day trial with full features but I could be wrong.

The 7 day trial is full features I believe but if you bought the basic plan maybe it overrides the trial period if that is the reason you can’t connect a database

Yeah that is possible. Can somebody from Wappler confirm that? Is there a way to still get 7 day trial?

@George Won’t tag the rest of the team as they might be enjoying their weekend seen George on here a few times today.

1 Like

Yes the 7 days trial includes all the pro features.

The error you are getting seems to come from the database server itself.

Is it local database or remote?

It is local on my MacBook

Here is the output from mysql status command, if that helps:

mysql> status

mysql Ver 8.0.26 for macos11.3 on x86_64 (Homebrew)

Connection id: 13
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ‘’
Using delimiter: ;
Server version: 8.0.25 Homebrew
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8mb4
Db characterset: utf8mb4
Client characterset: utf8mb4
Conn. characterset: utf8mb4
UNIX socket: /tmp/mysql.sock
Binary data as: Hexadecimal
Uptime: 2 min 8 sec

Any ideas to resolve the issue?

@George is there any path to resolve this problem?

I guess if this the only avenue available for help and nobody is able to help, I should probably cancel my subscription. :slightly_frowning_face:

Is this a NodeJS, php, aspx project?
Is it running on a local docker or are you using something like WAMP, MAMP, LAMP

Have you tried changing the password to something without all the @!#$ characters to just test if suddenly the connection works, then we will know it is something to do with that.

Have you tried connecting to the database via Server Connect or under Database Manager?

I can only assume but it is likely because you are registered using the Basic version. Even solving this problem now will not help you going forward without the pro version.

Sorry man.

NodeJS app
No docker. I am using Wappler IDE on OSX and create a new NodeJS project.

I tried changing the password (it has now has alphabets, numbers and symbol ! ! but got same issue

Yes I have, no luck.

I have upgrade to Pro, still same issue.

Just wanted to point out that in mysql console when running the status command output includes this:

Connection: Localhost via UNIX socket

I assume your MySQL 8 database was already an existing database, and not setup in Wappler, as you are not using Docker.

I think the easiest way to get more help is to give a few screenshots of the connection settings you are trying in Wappler, or a short video of the process.

Yes I am trying to connect to an existing mysql 8 db. Here is short video, showing the steps I have taken to connect to mysql from Wappler. Video like: https://www.loom.com/share/da75e78e623f48fab7b07c6e7c498e1f

Thanks that helps me understand exactly where you are at.

So as a test please go about this a slightly different way. Instead of opening database manager, rather click the workflows icon above it, open out Globals, right click Database Connections and try the exact same thing as you did in the database manager section.

Let me know if that works please.

On a side note, I have noticed from time to time that although the test of the database connection may fail, sometimes saving the connection anyway, saving the project and publishing, actually works anyway.

A few other strange things to try http://localhost instead of just localhost. Also are you 100% sure its on port 3306 as I had another package install it on a different port a while back, I think it was 8889 which was pretty strange in my mind.

So I tried all of these things and it did not help. I keep coming back to my connection type to be

UNIX socket: /tmp/mysql.sock

Is that connection type supported rather than tcp port. As per PHP PDO docs at https://www.php.net/manual/en/ref.pdo-mysql.connection.php, syntax of data source name (DSN) in the case of unix socket is:

mysql:unix_socket=/tmp/mysql.sock;dbname=testdb
instead of
mysql:host=localhost;port=3307;dbname=testdb