notas:bases_de_datos
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previaPróxima revisiónAmbos lados, revisión siguiente | ||
notas:bases_de_datos [2010/04/07 16:46] – cayu | notas:bases_de_datos [2011/07/04 13:36] – cayu | ||
---|---|---|---|
Línea 134: | Línea 134: | ||
show tables like ' | show tables like ' | ||
</ | </ | ||
+ | |||
+ | ==== Replicacion facil ==== | ||
+ | |||
+ | < | ||
+ | [mysqld] | ||
+ | datadir=/ | ||
+ | socket=/ | ||
+ | |||
+ | old_passwords=1 | ||
+ | log_bin = / | ||
+ | relay-log = / | ||
+ | max_binlog_size = 100M | ||
+ | |||
+ | expire_logs_days | ||
+ | max_binlog_size | ||
+ | |||
+ | log-bin | ||
+ | binlog-do-db=proxyauth | ||
+ | skip-slave-start | ||
+ | |||
+ | server-id=1 | ||
+ | replicate-do-table=base.tabla | ||
+ | |||
+ | master-host=10.1.1.1 | ||
+ | master-user=root | ||
+ | master-password=contraseña | ||
+ | master-port=3306 | ||
+ | |||
+ | [mysql.server] | ||
+ | user=mysql | ||
+ | basedir=/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [mysqld] | ||
+ | datadir=/ | ||
+ | socket=/ | ||
+ | |||
+ | old_passwords=1 | ||
+ | log_bin = / | ||
+ | relay-log = / | ||
+ | max_binlog_size = 100M | ||
+ | |||
+ | expire_logs_days | ||
+ | max_binlog_size | ||
+ | |||
+ | log-bin | ||
+ | binlog-do-db=proxyauth | ||
+ | skip-slave-start | ||
+ | |||
+ | server-id=2 | ||
+ | replicate-do-table=base.tabla | ||
+ | |||
+ | master-host=10.1.1.2 | ||
+ | master-user=root | ||
+ | master-password=contraseña | ||
+ | master-port=3306 | ||
+ | |||
+ | [mysql.server] | ||
+ | user=mysql | ||
+ | basedir=/ | ||
+ | </ | ||
+ | |||
+ | **skip-slave-start** //Es para tener que hacer el start slave; manualmente (por si las dudas).// | ||
+ | |||
+ | |||
+ | |||
+ | ==== Importar/ | ||
+ | Importacion : | ||
+ | <code sql> | ||
+ | LOAD DATA LOCAL INFILE ' | ||
+ | INTO TABLE usuarios | ||
+ | FIELDS TERMINATED BY ',' | ||
+ | ENCLOSED BY '"' | ||
+ | LINES TERMINATED BY ' | ||
+ | (nombre, pass, usuario); | ||
+ | </ | ||
+ | |||
+ | Exportacion : | ||
+ | <code sql> | ||
+ | SELECT * FROM usuarios ORDER BY date DESC | ||
+ | INTO OUTFILE " | ||
+ | FIELDS TERMINATED BY ',' | ||
+ | ENCLOSED BY '"' | ||
+ | LINES TERMINATED BY ' | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Oracle ===== | ||
+ | |||
+ | |||
+ | ==== Oracle XE issues ==== | ||
+ | |||
+ | Oracle xe must be the buggiest free counterpart of a commercial product ever released.Here' | ||
+ | |||
+ | * I don't set up it to be started upon boot (don't want this bag of bugs eat my memory) | ||
+ | * change the default apex port from 8080 to smth else | ||
+ | * use 8+ characters for sys/system password | ||
+ | * check status of the DB: $ sudo / | ||
+ | * start the DB - I use restart just to be sure: $ sudo / | ||
+ | |||
+ | Q: After installing and sourcing / | ||
+ | |||
+ | |||
+ | > ORA-12519, TNS:no appropriate service handler found | ||
+ | |||
+ | |||
+ | A: Run the following statement from sqlplus or web admin (you should have it accessible due to above tips) | ||
+ | |||
+ | |||
+ | > ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE; | ||
+ | |||
+ | |||
+ | Found [[http:// | ||
+ | |||
+ | |||
+ | Q: How to remove oracle user from ubuntu desktop login screen. | ||
+ | |||
+ | A: Change the oracle' | ||
+ | |||
+ | |||
+ | $ sudo usermod --gid 999 oracle | ||
+ | |||
+ | After that change the ownership of the files in /var/tmp/. | ||
+ | |||
+ | oracle$ sudo chown -R oracle:dba / | ||
+ | |||
+ | or you won't be able to start the DB anymore :) | ||
+ | |||
+ | |||
+ | Q: Cannot open Oracle web interface, Page cannot be displayed. Used to work before, and the DB is working. | ||
+ | |||
+ | |||
+ | A: Might happen especially if you selected to start the DB manually rather than on each boot. The symptoms might be a bit different, the DB might be started or might be not. Some services just fail to start. | ||
+ | |||
+ | Try restart : | ||
+ | |||
+ | $ sudo / |
notas/bases_de_datos.txt · Última modificación: 2013/09/13 14:21 por cayu