<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
  <title>Webnaranja</title>
  <link>https://www.webnaranja.com/</link>
  <description>Webnaranja</description>
  <language>en-us</language>
  <pubDate>Wed, 24 Dec 2025 23:37:41 GMT</pubDate>
  <ttl>1440</ttl>
  <generator>Webnaranja</generator>
  <copyright>Webnaranja</copyright>
  <category>Forums - Bases de Datos</category>
  <docs>https://cyber.harvard.edu/rss/rss.html</docs>
  <image>
    <url>https://www.webnaranja.com/images/logo.gif</url>
    <title>Webnaranja</title>
    <link>https://www.webnaranja.com/</link>
  </image>

<item>
  <title>Cómo configurar MySql para guardar emojis-</title>
  <link>https://www.webnaranja.com/index.php?name=Forums&amp;file=viewtopic&amp;p=6520#6520</link>
  <description>Como configurar una base de datos Mysql para poder guardar emojis:
El secreto esta en la configuración de la codificación para guardar los caracteres en esa tabla:
Si es un campo de texto la cofiguración deberia ser como minimo: utf8mb4_unicode_ci o utf8mb4
Ej. De estructura: post_text	text	utf8mb4_unicode_ci	

Se deberá ajustar el collation de la tabla por ejemplo a utf8mb4_unicode_ci
Y lo mismo para la conexion de la base de datos Mysql: utf8mb4_unicode_ci o utf8mb4</description>
  <pubDate>Wed, 24 Dec 2025 23:37:41 GMT</pubDate>
</item>

<item>
  <title>Ajustar configuración de Servidor Mysql con MysqlTuner 2025-</title>
  <link>https://www.webnaranja.com/index.php?name=Forums&amp;file=viewtopic&amp;p=6498#6498</link>
  <description>Ajustar y mejorar el rendimiento de un servidor Mysql con el script perl mysqltuner.pl
En este caso un servidor Linux Ubuntu 24, con Base de datos Mariadb 10.x.xx


#Obtengo el script, descargándolo en mi servidor.

Root@Sever_Name:~# wget https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl -O mysqltuner.pl
--2025-05-09 03:26:08--  https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl
Resolving raw.github.com (raw.github.com)... 2606:50c0:8000::154, 2606:50c0:8001::154, 2606:50c0:8003::154, ...
Connecting to raw.github.com (raw.github.com)|2606:50c0:8000::154|:443... Connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl [following]
--2025-05-09 03:26:08--  https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8002::154, 2606:50c0:8003::154, 2606:50c0:8000::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8002::154|:443... Connected.
HTTP request sent, awaiting response... 200 OK
Length: 265070 (259K) [text/plain]
Saving to: ‘mysqltuner.pl’

Mysqltuner.pl   100%[===&amp;gt;] 258.86K  --.-KB/s    in 0.02s

2025-05-09 03:26:09 (13.8 MB/s) - ‘mysqltuner.pl’ saved [265070/265070]

Root@Sever_Name:~#

# Ajusto permisos:

Root@Sever_Name:~# chmod +x mysqltuner.pl

# Ejecutamos el script:

Root@Sever_Name:~# ./mysqltuner.pl

MySQLTuner 2.6.2
   * Jean-Marie Renouard &amp;lt;jmrenouard@gmail.com&amp;gt;
   * Major Hayden &amp;lt;major@mhtx.net&amp;gt;
 &amp;gt;&amp;gt;  Bug reports, feature requests, and downloads at http://mysqltuner.pl/
 &amp;gt;&amp;gt;  Run with &amp;#039;--help&amp;#039; for additional options and output filtering

ℹ  Skipped version check for MySQLTuner script
✘  Failed to execute: SHOW REPLICAS\G
✘  FAIL Execute SQL / return code: 256
✔  Operating on 64-bit architecture

--- Storage Engine Statistics ---
ℹ  Status: +Aria +CSV +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA +SEQUENCE
ℹ  Data in MyISAM tables: 24.3G (Tables: 1079)
ℹ  Data in Aria tables: 32.0K (Tables: 1)
ℹ  Data in InnoDB tables: 8.6G (Tables: 365)
✔  Total fragmented tables: 0

✔  Currently running supported MySQL version 10.11.11-MariaDB

--- Log file Recommendations ---
✘  Log file  doesn&amp;#039;t exist

--- Analysis Performance Metrics ---
ℹ  innodb_stats_on_metadata: OFF
✔  No stat updates during querying INFORMATION_SCHEMA.
....

--- Replication Metrics ---
ℹ  Galera Synchronous replication: NO
ℹ  No replication slave(s) for this server.
ℹ  Binlog format: MIXED
ℹ  XA support enabled: ON
ℹ  Semi synchronous replication Master: OFF
ℹ  Semi synchronous replication Slave: OFF
ℹ  This is a standalone server

--- Recommendations ---
General recommendations:
    Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=ON
    We will suggest raising the &amp;#039;join_buffer_size&amp;#039; until JOINs not using indexes are found.
   See https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_join_buffer_size
    When making adjustments, make tmp_table_size/max_heap_table_size equal
    Reduce your SELECT DISTINCT queries which have no LIMIT clause
    Performance schema should be activated for better diagnostics
    MyISAM engine is deprecated, consider migrating to InnoDB
    Be careful, increasing innodb_log_file_size / innodb_log_files_in_group means higher crash recovery mean time
Variables to adjust:
    skip-name-resolve=ON
    join_buffer_size (&amp;gt; 256.0K, or always use indexes with JOINs)
    tmp_table_size (&amp;gt; 16M)
    max_heap_table_size (&amp;gt; 16M)
    table_definition_cache (400) &amp;gt; 1736 or -1 (autosizing if supported)
    performance_schema=ON
    innodb_buffer_pool_size (&amp;gt;= 8.6G) if possible.
    innodb_log_file_size should be (=32M) if possible, so InnoDB total log file size equals 25% of buffer pool size.
Root@Sever_Name:~#


#Editar /etc/mysql/my.cnf

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 0. &quot;/etc/mysql/my.cnf&quot; symlinks to this file, reason why all the rest is read.
# 1. &quot;/etc/mysql/mariadb.cnf&quot; (this file) to set global defaults,
# 2. &quot;/etc/mysql/conf.d/*.cnf&quot; to set global options.
# 3. &quot;/etc/mysql/mariadb.conf.d/*.cnf&quot; to set MariaDB-only options.
# 4. &quot;~/.my.cnf&quot; to set user-specific options.

Skip-name-resolve=ON
 
Join_buffer_size=512K
Tmp_table_size = 512M
Max_heap_table_size = 512M
Table_definition_cache = 1736
Key_buffer_size = 12M

Performance_schema=ON
Innodb_buffer_pool_size = 9G
Innodb_log_file_size = 1G
Innodb_log_buffer_size = 1G


# Reiniciar y volver a pasar el script varias veces:

Root@Sever_Name:~# service mysqld restart
Root@Sever_Name:~# ./mysqltuner.pl
 
Nota: en negrita los comandos</description>
  <pubDate>Fri, 09 May 2025 09:09:10 GMT</pubDate>
</item>

<item>
  <title>Ayuda con un ejercicio Modelo ER ternarias-</title>
  <link>https://www.webnaranja.com/index.php?name=Forums&amp;file=viewtopic&amp;p=6429#6429</link>
  <description>Pudiste hacerlo al final ?</description>
  <pubDate>Sun, 05 May 2024 14:46:46 GMT</pubDate>
</item>

<item>
  <title>Portales de datos abiertos (open data)-</title>
  <link>https://www.webnaranja.com/index.php?name=Forums&amp;file=viewtopic&amp;p=6148#6148</link>
  <description>Gracias por esta nueva aportación.  &amp;#128077;</description>
  <pubDate>Thu, 18 Feb 2021 17:50:00 GMT</pubDate>
</item>

<item>
  <title>Solicito apoyo para analizar relacion entre tablas Mysql-</title>
  <link>https://www.webnaranja.com/index.php?name=Forums&amp;file=viewtopic&amp;p=6092#6092</link>
  <description>tengan todo un buen día, estoy incursionando en las bases de datos y, realice un diagrama entidad relación de tipo supermercado, pero no estoy seguro si las relaciones entre las tablas me quedo bien planteadas 

este es el enlace al diagrama se puede abrir con mysql workbench
https://drive.google.com/file/d/1fpm6CWwN83ireLL6TDekaUZ3jRqCzXMs/view?usp=sharing</description>
  <pubDate>Mon, 07 Dec 2020 03:12:05 GMT</pubDate>
</item>

<item>
  <title>Pruebas con emojis en foro phpbb-</title>
  <link>https://www.webnaranja.com/index.php?name=Forums&amp;file=viewtopic&amp;p=6042#6042</link>
  <description>Adaptación a emojis de una base de datos phpbb:
https://stackoverflow.com/questions/39463134/how-to-store-emoji-character-in-mysql-database
&amp;#127757;&amp;#127757;&amp;#127757;&amp;#128161;</description>
  <pubDate>Thu, 09 Jul 2020 11:17:05 GMT</pubDate>
</item>

<item>
  <title>Solución a (Errcode: 24 - Too many open files) Plesk-</title>
  <link>https://www.webnaranja.com/index.php?name=Forums&amp;file=viewtopic&amp;p=5950#5950</link>
  <description>Hola,

Dejo por aquí la solución a este error que se produce cuando se excede el límite de archivos abiertos que se le permite al sistema.
El límite actual lo podemos ver en la base de datos:

Quote::

	 MariaDB &gt; SHOW VARIABLES LIKE &#039;open%&#039;;

+---+---+
| Variable_name    | Value |
+---+---+
| open_files_limit | 1024  |
+---+---+ 

Para aumentar ese valor creamos y editamos el siguiente archivo:

Quote::

	 MariaDB
sudo mkdir /etc/systemd/system/mariadb.service.d
sudo vi /etc/systemd/system/mariadb.service.d/override.conf

MySQL
sudo mkdir /etc/systemd/system/mysql.service.d
sudo vi /etc/systemd/system/mysql.service.d/override.conf 

Escribimos en el archivo la siguiente configuración:

Quote::

	 [Service]
LimitNOFILE=10000 

Donde LimitNOFILE es el nuevo valor que queremos dar al límite de archivos abiertos.

Después de guardar los cambios reiniciamos el servicio:

Quote::

	 MariaDB
sudo systemctl daemon-reload
sudo systemctl restart mariadb

MySQL
sudo systemctl daemon-reload
sudo systemctl restart mysql 

Ahora si comprobamos de nuevo el límite actual, veremos que ha cambiado:

Quote::

	 MariaDB &gt; SHOW VARIABLES LIKE &#039;open%&#039;;

+---+---+
| Variable_name    | Value |
+---+---+
| open_files_limit | 10000 |
+---+---+
1 row in set (0.00 sec)
 Saludos  &amp;lt;img src=&quot;/images/smiles/icon_wink.gif&quot; alt=&quot;Guiño&quot; title=&quot;Guiño&quot; /&amp;gt;</description>
  <pubDate>Wed, 07 Aug 2019 08:50:05 GMT</pubDate>
</item>

<item>
  <title>BBDD relacional tienda online multiartículos-</title>
  <link>https://www.webnaranja.com/index.php?name=Forums&amp;file=viewtopic&amp;p=5890#5890</link>
  <description>Hola
Generar las tablas de forma dinámica es complicado y ademas te obliga a hacer cambios en programación cada dos por tres.

Un fallo en un campo, te dejaría fuera de combate la tienda al completo.

Yo iria a pensar mas bien en productos genéricos y no en que tipo de producto.

Podria los campos comunes numéricos y el titulo del producto en una tabla, que llamaríamos principal, los elementos comunes genéricos comunes de texto en otra tabla (para hacer mas ligera la tabla principal) y luego los accesorios, comunes pero poco consultados en una tercera. La breve descripción del producto luego ves en cual es mas interesante ponerla, de las dos primeras. Una cuarta tabla la dejaría para campos especiales que no son comunes a todos los tipos de producto.

Piensa que el panel de productos que se presenta a la entrada de la tienda solo debería consultar la primera y la segunda y debe ser común a todos los productos de la tienda. Lleva allí cualquier campo de uso común que sea necesario y piensa que si es necesario para presentar dicha pagina, debe estar allí, aunque solo se use en un tipo de producto.

Para plantearlo, piensa en el producto como un todo y no como un tipo de producto. El objeto producto debe ser capaz de englobar cualquier tipo de producto... los tipos excepción también.</description>
  <pubDate>Sat, 10 Nov 2018 11:45:47 GMT</pubDate>
</item>

<item>
  <title>migrar relaciones de access a mysql-</title>
  <link>https://www.webnaranja.com/index.php?name=Forums&amp;file=viewtopic&amp;p=5846#5846</link>
  <description>Tengo muchas dudas acerca de diseño? y paginas.</description>
  <pubDate>Sat, 19 May 2018 17:23:06 GMT</pubDate>
</item>

<item>
  <title>help consulta-</title>
  <link>https://www.webnaranja.com/index.php?name=Forums&amp;file=viewtopic&amp;p=5765#5765</link>
  <description>Saludos Comunidad

Tengo las sgts. tablas cab_compras , det_compras, com_proveedores, productos
la consulta me debe arrojar los sgt.

la ultima compra (fecha mas actual)

productos
id	nombre
1	prod1	
2	prod2
3	prod3
4	prod4

com_proveedores
id	nombre
1	xxx	
2	yyy
3	zzz

cab_compras
id	idprovee	fecha		subtotal1	descto	sutotal2	impuesto	total	
1	1		02-01-2017	####		###	###		##		####
2	2		02-02-2017	####		###	###		##		####
3	3		02-03-2017	####		###	###		##		####
4	1		15-03-2017	####		###	###		##		####
5	2		28-03-2017	####		###	###		##		####

det_compras
id_compras	id_item		cant	costo	total
1		1		50	##	##
1		2		60	##	##
1		4		70	##	##

2		1		50	##	##
2		3		75	##	##

3		3		80	##	##

4		1		50	##	##
4		2		50	##	##
4		4		50	##	##

5		4		80	##	##


RESULTADO (ultima compra x item)
______________
item	prove	cant	fecha
prod1	xxx	50	15-03-2017
prod2	xxx	50	15-03-2017
prod3	zzz	80	02-03-2017
prod4	yyy	80	28-03-2017

Gracias</description>
  <pubDate>Wed, 05 Apr 2017 04:42:57 GMT</pubDate>
</item>

</channel>
</rss>
