
Ejemplo Cursor MySQL DELIMITER $$ CREATE PROCEDURE createEmailList ( INOUT emailList varchar(4000) ) BEGIN DECLARE finished INTEGER DEFAULT 0; DECLARE emailAddress varchar(100) DEFAULT ""; –…

Para las instalaciones recientes, querrá ejecutar el script de seguridad que viene incluido. Esto cambia algunas de las opciones predeterminadas menos seguras para cosas como…

Supongamos que tenemos una base de datos mysql llamada ‘personas’ a la que podemos acceder con usuario ‘usudb’ y contraseña ‘clave’. La base de datos…

Hoy en mi trabajo tuve la necesidad de copiar una base de datos mysql de un servidor a otro sin poder utilizar las funciones de…

Introduction MySQL is the most popular open-source relational database management system in the world. Modern package managers have reduced some of the friction to getting…

Backing up all your MySQL databases one by one is a pain. Here is a small bash script I made to dump and compress all my…

mysql -u root -p mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘PASSWORD’ WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; mysql> exit

Generar archivo my.cnf [client] user=user password=secret routines databases Es conveniente cambiar permisos a este archivo con el comano chmod 600 my.cnf mysqldump –defaults-extra-file=»my.cnf» database1 database2…

C:\ProgramData\MySQL\MySQL Server 5.6 Dentro de [mysqld] innodb_buffer_pool_size=1024M wait_timeout = 350 Por defecto mysql cierra una conexión después de 8 horas sin recibir ninguna petición del…

SELECT DATE_FORMAT(fecha, ‘%T’), date(fecha) FROM tabla; select * from tabla where DATE_FORMAT(fecha, ‘%T’) <> ’00:00:00′ update tabla set fecha = date(fecha);