0

I'm working on a Symfony project and using mysql local database on my mac and it was working perfectly fine until today when i wanted to update the database table using the command

./bin/console doctrine:schema:update --force

and its giving me this error, can somebody help me find out whats going on.

[Doctrine\DBAL\DBALException]                                                                                                                                              
  An exception occurred while executing 'SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Colum  
  n_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM  
   information_schema.STATISTICS WHERE TABLE_NAME = 'collectionTopping' AND TABLE_SCHEMA = 'foodSystem' ORDER BY SEQ_IN_INDEX ASC':                                          
  Warning: PDO::query(): MySQL server has gone away                                                                                                                          


 [Symfony\Component\Debug\Exception\ContextErrorException]  
  Warning: PDO::query(): MySQL server has gone away  

I am using Symfony 3 on a Mac OS

zero cool
  • 9
  • 5
  • Did you reboot your mac today? Sounds like your mysql server was stopped and not restarted. – Cerad Nov 15 '19 at 14:30
  • No I havent rebooted it, and its still running as the website still getting data from the database and users can still login. It only doesnt allow me to update tables from doctrine entities when I run that command – zero cool Nov 15 '19 at 14:35
  • Please update your question with details about your environment, such as version numbers of Symfony, MySQL and your OS. – Stephan Vierkant Nov 16 '19 at 22:30
  • Does this answer your question? [MySQL error 2006: mysql server has gone away](https://stackoverflow.com/questions/7942154/mysql-error-2006-mysql-server-has-gone-away) – Mike Doe Nov 17 '19 at 10:08
  • no the connection was still on it only happens when I try to update doctrine tables – zero cool Nov 18 '19 at 17:22

0 Answers0