Cant coonect to mysql database from diffrent machine

Keywords: MySQL - Google Cloud Platform - Technical issue - Other
After doing every step from instruction (, on step: /opt/bitnami/mysql/bin/mysql -u root -p -e “grant all privileges on . to ‘root’@’%’ identified by ‘PASSWORD’ with grant option”; i have got this: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near ‘identified by ‘-------’ with grant option’ at line 1 . Can You please help me with this issue? Thank You

Hi @mani103085,

Sorry to hear that. The documentation needs to be updated to match with the MySQL 8.x’s syntax. Please run these commands

sudo /opt/bitnami/mysql/bin/mysql -u root -p -e "create user 'root'@'%' identified by 'PASSWORD';"
sudo /opt/bitnami/mysql/bin/mysql -u root -p -e "grant all privileges on *.* TO 'root'@'%';"

Happy to help!

Was my answer helpful? Click on :heart:

1 Like

It works, thank you so much :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.