Cannot connect to mysql 8 on osx

I am busy testing this on a spare mac for you, will let you know what it turns up.

Well I just did this on a newly installed spare mac, starting from downloading NodeJS 14, to downloading MySQL 8, installing both, connecting via mac terminal, creating a database named the same as yours, and a table named the same as yours. Installing the latest Wappler, setup a new project as you have, and using database manager to enter the exact same details as in your video, it worked instantly.

To be very honest I personally think this is still your password
Wappler URL Encodes special characters, so a password like Paul1977!@#$ would actually be sent via Wappler as Paul1977!%40%23%24, if you take a look at your Import and Export Connection dialogue it shows its connection string, mysql2://root:Paul1977!%40%23%24@localhost:3306/kchomes_dev and I am not sure what would happen with all those URL Encoded characters.

Maybe try change your password to something crazy simple for testing like testabc, once you get it working you can play with that more.

Installations I used
Mac OS Big Sur 11.6

If any of that helps at all.

I did have to alias my mysql after installation as I was getting a command not found error when trying to access it via terminal alias mysql=/usr/local/mysql/bin/mysql

First of all thank you so much Paul for spending so much time to help me troubleshoot my problem. Really appreciate it.

I am almost 99.9% sure it is not a password issue on my side, but some mysql setup/config issue. I installed MySql using homebrew and not from .dmg package. I have a feeling there is some setting in MySql which is not allowing tcp connection.

If you still have MySql installed, can you do me favor and run this command to connect with mysql client:
mysql -u root -p --port 3306 --protocol=TCP

I get the same “Access denied” error with this. But the following command works:
mysql -u root -p --port 3306 --protocol=SOCKET

Also can u run this command in MysSql and share your output:
show variables like 'skip_networking';

My output is:
| Variable_name | Value |
| skip_networking | OFF |

No problem

mysql -u root -p --port 3306 --protocol=TCP works fine for me
mysql -u root -p --port 3306 --protocol=SOCKET works fine for me

My skip_networking is identical to yours, also OFF

The only other thing I can think of is during installation of mine I get the following with 2 choices, I chose the stronger encryption for mine.

Thanks again Paul. So since I cannot connect with:
mysql -u root -p --port 3306 --protocol=TCP

that is my initial issue since looks like Wappler is trying to use TCP connection and I will work on figuring it out outside Wappler.

Does Wappler support UNIX SOCKET connection to MySQL?
Unix socket connection seems to work fine for me with MySQL client.

This would have to be answered by one of the team @Teodor @George

Wappler uses just TCP connections to MySQL at the given port.

Seems something is wrong with your root password.

Maybe try a simpeler root password.

I finally figured out the solution for TCP connections.

#step 1

CREATE USER my_db_user identified by 'Password!@#'
# this creates a user my_db_user with '%' wildcard host

# step 2
grant all PRIVILEGES on my_db_dev.* to 'my_db_user'@'%';
and then issue command:
Now this user can connect to mysql db my_db_dev using TCP connection using this command:

mysql -u my_db_user -p -h;