symfony3:sqlstate[hy000][2006]mysql服务器在更新模式时消失了

pxyaymoc  于 2021-06-19  发布在  Mysql
关注(0)|答案(7)|浏览(374)

从今天早上开始,每次我尝试更新数据库的架构时,都要感谢以下命令: php bin/console doctrine:schema:update --force . 我收到4个错误,您可以看到以下输出:

In AbstractMySQLDriver.php line 126:
An exception occurred in driver: SQLSTATE[HY000] [2006] MySQL server has gone away  

In PDOConnection.php line 50:
SQLSTATE[HY000] [2006] MySQL server has gone away  

In PDOConnection.php line 46:
SQLSTATE[HY000] [2006] MySQL server has gone away  

In PDOConnection.php line 46:
PDO::__construct(): Unexpected server respose while doing caching_sha2 auth: 109

从昨天起我什么也没变。
这是我的参数。yml:

parameters:
  database_host: 127.0.0.1
  database_port: 3306
  database_name: theatreP
  database_user: root
  database_password: ~
  mailer_transport: gmail
  mailer_host: 127.0.0.1
  mailer_user: %mon_mail%
  mailer_password: %psw%
  secret: ThisTokenIsNotSoSecretChangeIt`

我还检查超时 SHOW SESSION VARIABLES LIKE '%timeout'; : `+

gxwragnw

gxwragnw1#

  • | connect_timeout | 10 | | delayed_insert_timeout | 300 | | have_statement_timeout | YES | | innodb_flush_log_at_timeout | 1 | | innodb_lock_wait_timeout | 50 | | innodb_rollback_on_timeout | OFF | | interactive_timeout | 28800 | | lock_wait_timeout | 31536000 | | mysqlx_connect_timeout | 30 | | mysqlx_idle_worker_thread_timeout | 60 | | mysqlx_interactive_timeout | 28800 | | mysqlx_port_open_timeout | 0 | | mysqlx_read_timeout | 30 | | mysqlx_wait_timeout | 28800 | | mysqlx_write_timeout | 60 | | net_read_timeout | 30 | | net_write_timeout | 60 | | rpl_stop_slave_timeout | 31536000 | | slave_net_timeout | 60 | | wait_timeout | 28800 | +
neskvpey

neskvpey3#

在我的例子中,我必须修改mysql用户,使其标识为“caching\u sha2\u password”:

CREATE USER 'db_user'@'localhost' IDENTIFIED BY 'user_password';

ALTER USER `db_user`@`localhost` IDENTIFIED WITH caching_sha2_password BY 'user_password';

GRANT ALL PRIVILEGES ON mydatabase.* TO 'db_user'@'localhost';
gk7wooem

gk7wooem4#

+` 我试图更改值wait\u timeout&&interactive\u timeout,但找不到要修改的文件
我使用mac os:10.13.6(high sierra)
mysql:8.0.12,用于x86\U 64(自制)上的osx10.13
php:7.1.20版本
节点:v8.12.0
npm:6.4.1

yjghlzjz

yjghlzjz7#

  • | Variable_name | Value | +

相关问题