You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Screenshot
What did you do?
I wrote the code as per the documentation and ran it and got the following error.
% export DBUSER=username
% export DBPASS=password
% go run .
[mysql] 2022/01/10 17:16:10 connector.go:95: could not use requested auth plugin 'mysql_native_password': this user requires mysql native password authentication.
2022/01/10 17:16:10 this user requires mysql native password authentication.
exit status 1
And when I ran go run . again, this time I got the following error.
% go run .
2022/01/10 17:18:16 Error 1045: Access denied for user 'username'@'localhost' (using password: YES)
exit status 1
I found out that he did not have permission to the recordings database, so I granted him permission.
mysql> grant all on *.* to username@localhost;
I did the above and it worked.
% go run .
Connected!
Albums found: [{1 Blue Train John Coltrane 56.99} {2 Giant Steps John Coltrane 63.99}]
Album found: {2 Giant Steps John Coltrane 63.99}
ID of added album: 5
What did you expect to see?
I would like to see the following added to the documentation.
AllowNativePasswords: true,
The text was updated successfully, but these errors were encountered:
What is the URL of the page with the issue?
page: https://go.dev/doc/tutorial/database-access
What is your user agent?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Screenshot
What did you do?
I wrote the code as per the documentation and ran it and got the following error.
I then rewrote the code using this issue as a reference. -> go-sql-driver/mysql#815 (comment)
And when I ran
go run .
again, this time I got the following error.I found out that he did not have permission to the recordings database, so I granted him permission.
I did the above and it worked.
What did you expect to see?
I would like to see the following added to the documentation.
The text was updated successfully, but these errors were encountered: