Index: conf.c
===================================================================
--- conf.c	(revisión: 195)
+++ conf.c	(copia de trabajo)
@@ -111,7 +111,7 @@
 	sql_log_timelapse:     0,
 	sql_query:             DEF_SQL_QUERY,
 	mysql_db:              NULL,
-	mysql_host:            NULL,
+	mysql_host:            "localhost",
 	mysql_user:            NULL,
 	mysql_password:        NULL,
 	on_picture_save:       NULL,
Index: motion.c
===================================================================
--- motion.c	(revisión: 195)
+++ motion.c	(copia de trabajo)
@@ -553,6 +553,10 @@
 			motion_remove_pid();
 			exit(1);
 		}
+		#if (defined(MYSQL_VERSION_ID)) && (MYSQL_VERSION_ID > 50012)
+		my_bool  my_true = TRUE;
+		mysql_options(cnt->database,MYSQL_OPT_RECONNECT,&my_true);
+		#endif
 	}
 #endif /* HAVE_MYSQL */
 
Index: motion-dist.conf
===================================================================
--- motion-dist.conf	(revisión: 195)
+++ motion-dist.conf	(copia de trabajo)
@@ -534,7 +534,7 @@
 # Mysql database to log to (default: not defined)
 ; mysql_db value
 
-# The host on which the database is located (default: not defined)
+# The host on which the database is located (default: localhost)
 ; mysql_host value
 
 # User account name for MySQL database (default: not defined)
Index: motion.1
===================================================================
--- motion.1	(revisión: 195)
+++ motion.1	(copia de trabajo)
@@ -207,7 +207,7 @@
 Name of the MySQL database.
 .TP
 .B mysql_host string
-Values: Max 4095 characters / Default: Not defined
+Values: Max 4095 characters / Default: localhost 
 .br
 IP address or domain name for the MySQL server. Use "localhost" if motion and MySQL runs on the same server.
 .TP
