Jul
29
2009
0

MySQL ERROR 1005 (HY000): Can’t create table ‘NameTable.frm’ (errno: 150)

This error 150 means “MySQL error code 150: Foreign key constraint is incorrectly formed”

So the common problem occurs if you try to create a new table with a foreign key without the table source FK (the source table doesn’t exist into DB ), the solution is create first the table source of the FK and then the another one.
or
Disable constraints check with:

SET FOREIGN_KEY_CHECKS = 0;

To enable check constraints

SET FOREIGN_KEY_CHECKS = 1;

Written by doutdex in: Base de Datos | Tags:
Jun
20
2009
0

Backup database -base de datos- mysql en archivo con cron con timestamp date fecha

Amigos un ejemplo practico de respaldar una base de datos:

Comandos:
1) Editar el archivo de crones para el usuario

crontab -e

2) Agregar una línea indicando cada cuanto se va ejecutar, para este ejemplo puntual el cron se ejecutará semanalmente todos los días Lunes a las 10:30 de la mañana.

30 10 * * mon date=`date "+%Y%m%d%H%M"`;mysqldump --host DOMAINDB -u USERNAME -pPASSWORD BDNAME >/RUTADESTINO/backupBD_$date.sql

El resultado es el backup de una BD con nombre “BDNAME” es un host remoto de mysql “DOMAINDB” con usuario “USERNAME” y clave “PASSWORD”, este backup se guarda en un archivo de texto con un nombre y la fecha tipo timestamp quedando asi:
backupBD_200906201008.sql

Written by doutdex in: Base de Datos,Linux,Mysql,Ubuntu,Unix | Tags: , , ,
Mar
12
2009
0
May
15
2008
0

Instalar Mysql 6.0 en windows XP

MYSQL
Primero ir a www.mysql.com descargar la ultima versión, la versión autoinstalable.

Luego instalar por defecto, siguiente si sabes que ese puerto esta usado para algo cambiarlo sino dejarlo, 3306, y dejar la contraseña para root

(more…)

Written by doutdex in: Base de Datos,Mysql | Tags:
Oct
29
2007
0

Conexión a mysql desde PHP, buscar

Aquí indico como hacer una conexión a mysql (BD) usando PHP

Primero debemos configurar la Base de datos, es decir, tener creada una BD (miBD) con un usuario(miUSER) y contraseña (miPASS) con permisos para leer y escribir dentro de ella, sabiendo esto, y alguna tabla conocida previamente creada ejm: ‘documents’, se utilizarán 2 archivos:

1 _bd.php : Contiene los datos de conexión a la BD y funciones que buscan, eliminan y modifican en la BD.

2 prueba.php : Éste archivo llama a la función de _bd.php y despliega en pantalla el resultado de la búsqueda BD.

(more…)

Written by doutdex in: Base de Datos,Mysql | Tags: ,
Jul
15
2007
1

Conflicto puerto 8080 Oracle XE 10 (problem with port 8080) – Oracle 10g Listener port 8080 conflict

When you installed Oracle XE by default in your pc (win and linux), the XE have one utility(the web-app service from oracle is running. to access by WEB using the port http:8080, http://127.0.0.1:8080/apex user: SYSTEM and password: “of the installation”, well if you dont have any other service running on the 8080 port, works fine!!! but if you have………. for example (web server – tomcat(8080) or any other running on the same port), you should change one of this, the tomcat port or the second way change the oracle port:

The second way:
The steps to change oracle http Port:
Open the command line of the oracle:

SQL>connect system

SQL>Enter the password"of the installation"

(more…)

Written by doutdex in: Base de Datos,Oracle | Tags: ,

TheBuckmaker.com Wordpress Themes | Geld von Privat, Streaming Audio