Сообщение об ошибке: не удается подключиться к серверу базы данных - PullRequest
1 голос
/ 18 мая 2019

Я пытаюсь настроить среду SQL:

  • MacOS Sierra 10.12.6

  • MySQL Community Server 8.0.16 - macOS10.14 (x86, 64-bit), DMG Archive (я не нашел более низкую версию)

  • MySQL Workbench 8.0.16 mysql-workbench-community-6.3.10-macos-x86_64.dmg

Я следую этому руководству: https://youtu.be/7S_tz1z_5bA?t=836 Для меня, когда я нажимаю «Проверить соединение», выдается следующее сообщение об ошибке:

Cannot Connect to Database Server

Your connection attempt failed for user 'root' from your host to server at 127.0.0.1:3306:
  Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found

Please:
1 Check that mysql is running on server 127.0.0.1
2 Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed)
3 Check the root has rights to connect to 127.0.0.1 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 127.0.0.1 connecting from the host address you're connecting from

Я нашёл НЕПРАВИЛЬНЫЕ вопросы, похожие на мои для ПК и Linux.

Кто-то рекомендовал Не удается загрузить плагин аутентификации 'caching_sha2_password' , что решает мой вопрос,Это даже не то же самое сообщение об ошибке, потому что оно спрашивает об ошибке

Authentication plugin 'caching_sha2_password' cannot be loaded: 
dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found

1 Ответ

0 голосов
/ 18 мая 2019

вы можете изменить шифрование пароля следующим образом.

ALTER USER 'yourusername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword';
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...