Всем привет.
Система Ubuntu 23.04
Не могу подключиться к mysql.
docker-compose.yml
mysql:
container_name: mysql_laravel9
image: mysql:8
restart: always
environment:
- "MYSQL_ROOT_PASSWORD=Serii1981;"
volumes:
- "./docker/mysql:/var/lib/mysql"
ports:
- "33062:3306"
Пытаюсь подключиться к mysql из терминала
❯ mysql -h 127.0.0.1 -P 33062 -u root -p
Enter password:
ERROR 2061 (HY000): Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection.
❯ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 343
Server version: 8.0.35-0ubuntu0.23.04.1 (Ubuntu)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Serii1981;';
Query OK, 0 rows affected (0.01 sec)
mysql> exit;
Bye
❯ sudo service mysql stop
sudo service mysql start
❯ mysql -h 127.0.0.1 -P 33062 -u root -p
Enter password:
ERROR 2061 (HY000): Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection.
Помогите разобраться почему не работает.
Заранее благодарен.