<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="https://dotclear.placeoweb.com/feed/rss2/xslt" ?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>PlaceOweb Dotclear - SQL</title>
    <link>https://dotclear.placeoweb.com/</link>
    <atom:link href="https://dotclear.placeoweb.com/feed/category/Sql/rss2" rel="self" type="application/rss+xml" />
    <description></description>
    <language>fr</language>
    <pubDate>Wed, 20 May 2026 15:53:59 +0200</pubDate>
    <copyright></copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>Dotclear</generator>
          <item>
        <title>mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log</title>
        <link>https://dotclear.placeoweb.com/post/mysqld.exe%3A-Aria-recovery-failed.-Please-run-aria_chk-r-on-all-Aria-tables-and-delete-all-aria_log</link>
        <guid isPermaLink="false">urn:md5:e996e8e737e0ac24e09e1e52a936032c</guid>
        <pubDate>Sun, 22 Jun 2025 19:26:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                <description>&lt;p&gt;mysql\data\mysql_error.log&lt;/p&gt;

&lt;pre&gt;
[Note] Starting MariaDB 10.4.32-MariaDB Cannot find checkpoint record at LSN (1,0x1272d)
[ERROR] mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files
[ERROR] Plugin &amp;#039;Aria&amp;#039; registration as a STORAGE ENGINE failed.
&lt;/pre&gt; &lt;p&gt;MySQL (MariaDB) ne se lance plus, dans son fichier de log : mysql_error.log
Il indique :

[ERROR] mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files
[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.



Pour ma part, en effaçant les fichier : aria_log.00000001,... &lt;a href=&quot;https://dotclear.placeoweb.com/post/mysqld.exe%3A-Aria-recovery-failed.-Please-run-aria_chk-r-on-all-Aria-tables-and-delete-all-aria_log&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/mysqld.exe%3A-Aria-recovery-failed.-Please-run-aria_chk-r-on-all-Aria-tables-and-delete-all-aria_log#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/mysqld.exe%3A-Aria-recovery-failed.-Please-run-aria_chk-r-on-all-Aria-tables-and-delete-all-aria_log#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/807</wfw:commentRss>
              </item>
          <item>
        <title>#1030 - Reçu l'erreur 176 &quot;Read page with wrong checksum&quot; du handler de la table Aria</title>
        <link>https://dotclear.placeoweb.com/post/1030-Re%C3%A7u-l-erreur-176-Read-page-with-wrong-checksum-du-handler-de-la-table-Aria</link>
        <guid isPermaLink="false">urn:md5:8bf7545e94d5e24636964ce5d3538061</guid>
        <pubDate>Sat, 17 May 2025 22:10:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                <description>&lt;pre&gt;
MariaDB&amp;gt; SELECT * FROM `mysql`.`db`;
ERROR 1030 (HY000): Got error 176 &amp;quot;Read page with wrong checksum&amp;quot; from storage engine Aria
&lt;/pre&gt; &lt;p&gt;MariaDB&gt; ANALYZE TABLE `mysql`.`db`;
+----------+---------+----------+-----------------------------+
| Table    | Op      | Msg_type | Msg_text                    |
+----------+---------+----------+-----------------------------+
| mysql.db | analyze | status   | Table is already up to date |... &lt;a href=&quot;https://dotclear.placeoweb.com/post/1030-Re%C3%A7u-l-erreur-176-Read-page-with-wrong-checksum-du-handler-de-la-table-Aria&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; #1030 - Reçu l'erreur 176 &amp;quot;Read page with wrong checksum&amp;quot; du handler de la table Aria&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/1030-Re%C3%A7u-l-erreur-176-Read-page-with-wrong-checksum-du-handler-de-la-table-Aria#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/1030-Re%C3%A7u-l-erreur-176-Read-page-with-wrong-checksum-du-handler-de-la-table-Aria#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/804</wfw:commentRss>
              </item>
          <item>
        <title>mysql fonction pour supprimer les balises html</title>
        <link>https://dotclear.placeoweb.com/post/mysql-fonction-pour-supprimer-les-balises-html</link>
        <guid isPermaLink="false">urn:md5:ca09a0480c24f2a089863c37776ffa91</guid>
        <pubDate>Sat, 08 May 2021 18:00:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;J'ai eu le même besoins que &lt;a href=&quot;https://stackoverflow.com/questions/38686923/how-to-remove-html-tags-except-br-from-mysql-data/38686974&quot;&gt;How to remove html tags except &amp;lt;br&amp;gt; from mysql data?&lt;/a&gt;, &lt;a href=&quot;https://stackoverflow.com/questions/2627940/remove-html-tags-from-record/13347316#13347316&quot;&gt;Remove HTML tags from record&lt;/a&gt; et &lt;a href=&quot;https://stackoverflow.com/questions/38868364/sql-remove-all-html-tags-in-a-string/38868776&quot;&gt;SQL - Remove all HTML tags in a string&lt;/a&gt;&lt;/p&gt; &lt;p&gt;DELIMITER mydelimiter
CREATE FUNCTION `strip_tags`($str text) RETURNS text DETERMINISTIC
BEGIN
    DECLARE $start, $end INT DEFAULT 1;
    LOOP
        SET $start = LOCATE(&quot;&lt;&quot;, $str, $start);
        IF (!$start) THEN RETURN $str; END IF;
        SET $end = LOCATE(&quot;&gt;&quot;, $str, $start);
        IF (!$end) THEN SET $end = $start; END IF;
        SET... &lt;a href=&quot;https://dotclear.placeoweb.com/post/mysql-fonction-pour-supprimer-les-balises-html&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; mysql fonction pour supprimer les balises html&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/mysql-fonction-pour-supprimer-les-balises-html#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/mysql-fonction-pour-supprimer-les-balises-html#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/774</wfw:commentRss>
              </item>
          <item>
        <title>Data Types SQL langages de programmation INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT</title>
        <link>https://dotclear.placeoweb.com/post/Data-Types-SQL-langages-de-programmation</link>
        <guid isPermaLink="false">urn:md5:5f6e2ae82218dff02faf87e63c7da4fa</guid>
        <pubDate>Sat, 05 Sep 2020 11:35:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>csharp</category>
                  <category>java</category>
                  <category>javascript</category>
                  <category>mysql</category>
                  <category>php</category>
                  <category>sql</category>
                <description>&lt;p&gt;Quels sont les types SQL et des langages de programmation JAVA, PHP, Javascript, ...&lt;/p&gt; &lt;p&gt;Types MySQL
Types MySQL (par défaut)
Taille (en octet)
Valeur min
Valeur max
JAVA



TINYINT
tinyint(4)
1
-128
127
byte :   (1 octet ) entiers compris entre -128 et +127 (-2^7 et 2^7-1)



TINYINT (unsigned)
tinyint(3) UNSIGNED
1
0
255




SMALLINT
smallint(6)
2
-32.768
32.767
short :  (2 octets ) entiers compris entre -32768 et +32767 (-2^15 et... &lt;a href=&quot;https://dotclear.placeoweb.com/post/Data-Types-SQL-langages-de-programmation&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; Data Types SQL langages de programmation INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/Data-Types-SQL-langages-de-programmation#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/Data-Types-SQL-langages-de-programmation#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/759</wfw:commentRss>
              </item>
          <item>
        <title>[ERROR] Failed to open the relay log [ERROR] Could not find target log during relay log initialization [ERROR] Initialized Master_info from [ERROR] Failed to create a new master info file [ERROR] Failed to initialize multi master structures - Aborting</title>
        <link>https://dotclear.placeoweb.com/post/%5BERROR%5D-Failed-to-open-the-relay-log-%5BERROR%5D-Could-not-find-target-log-during-relay-log-initialization-%5BERROR%5D-Initialized-Master_info-from-%5BERROR%5D-Failed-to-create-a-new-master-info-file-%5BERROR%5D-Failed-to-initialize-multi-master-structures-Aborting</link>
        <guid isPermaLink="false">urn:md5:19962961058686d4cdf4ef5519a0aa90</guid>
        <pubDate>Wed, 27 May 2020 19:30:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                <description>&lt;p&gt;Visiblement, suite à changement de configuration réseau DHCP et nom d'hôte, impossible de lancer le serveur MySQL MariaDB.&lt;/p&gt;


&lt;p&gt;Puisque je n'avais pas besoin de la réplication,&lt;/p&gt;


&lt;p&gt;en modifiant, le my.ini, et rajoutant :&lt;/p&gt;
&lt;pre&gt;
slave_sql_verify_checksum = OFF
&lt;/pre&gt;


&lt;p&gt;et supprimant :
master-xxx.info
mysql-relay-xxx.index
relay-log-xxx.info&lt;/p&gt;


&lt;p&gt;le serveur se relance :&lt;/p&gt; &lt;p&gt;D:\xampp_74\mysql\bin&gt;mysqld --console
2020-05-27 19:26:30 0 [Note] mysqld (mysqld 10.4.11-MariaDB) starting as process 21108 ...
InnoDB: using atomic writes.
2020-05-27 19:26:30 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-05-27 19:26:30 0 [Note] InnoDB: Uses event mutexes
2020-05-27 19:26:30 0 [Note] InnoDB:... &lt;a href=&quot;https://dotclear.placeoweb.com/post/%5BERROR%5D-Failed-to-open-the-relay-log-%5BERROR%5D-Could-not-find-target-log-during-relay-log-initialization-%5BERROR%5D-Initialized-Master_info-from-%5BERROR%5D-Failed-to-create-a-new-master-info-file-%5BERROR%5D-Failed-to-initialize-multi-master-structures-Aborting&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; [ERROR] Failed to open the relay log [ERROR] Could not find target log during relay log initialization [ERROR] Initialized Master_info from [ERROR] Failed to create a new master info file [ERROR] Failed to initialize multi master structures - Aborting&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/%5BERROR%5D-Failed-to-open-the-relay-log-%5BERROR%5D-Could-not-find-target-log-during-relay-log-initialization-%5BERROR%5D-Initialized-Master_info-from-%5BERROR%5D-Failed-to-create-a-new-master-info-file-%5BERROR%5D-Failed-to-initialize-multi-master-structures-Aborting#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/%5BERROR%5D-Failed-to-open-the-relay-log-%5BERROR%5D-Could-not-find-target-log-during-relay-log-initialization-%5BERROR%5D-Initialized-Master_info-from-%5BERROR%5D-Failed-to-create-a-new-master-info-file-%5BERROR%5D-Failed-to-initialize-multi-master-structures-Aborting#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/747</wfw:commentRss>
              </item>
          <item>
        <title>[ERROR] mysqld.exe: Index for table '.\mysql\db' is corrupt; try to repair it Couldn't repair table: mysql.db</title>
        <link>https://dotclear.placeoweb.com/post/%5BERROR%5D-mysqld.exe-Index-for-table-mysqldb-is-corrupt-try-to-repair-it-Couldn-t-repair-table-mysql.db</link>
        <guid isPermaLink="false">urn:md5:282de094dca4c3576c236f4f980283d7</guid>
        <pubDate>Wed, 22 Apr 2020 17:59:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                <description>&lt;p&gt;Aie ! C'est le drame, MySQL / MariaDB ne se lance plus sous mon installation XAMPP,
et le fichier de log (mysql\data\mysql_error.log), indique :&lt;/p&gt;

&lt;pre&gt;
[ERROR] mysqld.exe: Table '.\mysql\db' is marked as crashed and should be repaired
[ERROR] mysqld.exe: Index for table '.\mysql\db' is corrupt; try to repair it
[ERROR] Couldn't repair table: mysql.db
[ERROR] Fatal error: Can't open and lock privilege tables: Index for table 'db' is corrupt; try to repair it
&lt;/pre&gt; &lt;p&gt;Heureusement une solution existe : mysqld.exe: Table '.\mysql\db' is marked as crashed and should be repaired


Mise en pratique cela donne :


Lancement du serveur sql en mode sans vérification : mysqld --console --skip-grant-tables --skip-external-locking


Documentation des options de mysqld


Selon la documentation, les options en ligne de... &lt;a href=&quot;https://dotclear.placeoweb.com/post/%5BERROR%5D-mysqld.exe-Index-for-table-mysqldb-is-corrupt-try-to-repair-it-Couldn-t-repair-table-mysql.db&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; [ERROR] mysqld.exe: Index for table '.\mysql\db' is corrupt; try to repair it Couldn't repair table: mysql.db&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/%5BERROR%5D-mysqld.exe-Index-for-table-mysqldb-is-corrupt-try-to-repair-it-Couldn-t-repair-table-mysql.db#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/%5BERROR%5D-mysqld.exe-Index-for-table-mysqldb-is-corrupt-try-to-repair-it-Couldn-t-repair-table-mysql.db#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/744</wfw:commentRss>
              </item>
          <item>
        <title>SQL &quot;matching found rows&quot; vs &quot;affected rows&quot;</title>
        <link>https://dotclear.placeoweb.com/post/SQL-matching-found-rows-vs-affected-rows</link>
        <guid isPermaLink="false">urn:md5:ee033adb9f0c28652d664ec8a120f50a</guid>
        <pubDate>Sat, 05 Nov 2016 20:25:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>android</category>
                  <category>java</category>
                  <category>javaEE</category>
                  <category>mariadb</category>
                  <category>mysql</category>
                  <category>php</category>
                  <category>sql</category>
                  <category>sqlite</category>
                <description>&lt;p&gt;Lors de modifications (UPDATE, DELETE) comment différencier le nombre d'enregistrement qui matche au critère WHERE et le nombre d'enregistrement réellement modifiés par la requête ?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&quot;found (matched) rows&quot; le nombre d'enregistrements trouvés (potentiellement modifiable)&lt;/li&gt;
&lt;li&gt;&quot;affected (changed) rows&quot; le nombre d'enregistrements véritablement changés parmi les trouvés&lt;/li&gt;
&lt;/ul&gt; &lt;p&gt;En introduction, la conclusion

client MariaDB/MySQL : &quot;affected (changed) rows&quot; par défaut.
client SQLite : &quot;found (matched) rows&quot; uniquement ! pas moyen de le changer ?...
PHP + MariaDB/MySQL : &quot;affected (changed) rows&quot; par défaut, possibilité de passer en &quot;found (matched) rows&quot; avec l'option PDO::MYSQL_ATTR_FOUND_ROWS =&gt; true dans le connecteur... &lt;a href=&quot;https://dotclear.placeoweb.com/post/SQL-matching-found-rows-vs-affected-rows&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; SQL &amp;quot;matching found rows&amp;quot; vs &amp;quot;affected rows&amp;quot;&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/SQL-matching-found-rows-vs-affected-rows#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/SQL-matching-found-rows-vs-affected-rows#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/688</wfw:commentRss>
              </item>
          <item>
        <title>MySQL client données des colonnes blob affichée en hexa au lieu de string - binary-as-hex - skip-binary-as-hex</title>
        <link>https://dotclear.placeoweb.com/post/MySQL-client-donnees-hexa-string-binary-as-hex-skip-binary-as-hex</link>
        <guid isPermaLink="false">urn:md5:331b61a8c88780df14e00a7309f33e85</guid>
        <pubDate>Mon, 13 Jun 2016 12:01:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mysql</category>
                <description>&lt;p&gt;Avec le client MySQL, les données de type blob sont par défaut affichée en hexa au lieu de string.&lt;/p&gt; &lt;p&gt;MySQL client donnees hexa string



string-functions::char


If CHAR() is invoked from within the mysql client, binary strings display using hexadecimal notation, depending on the value of the --binary-as-hex.


mysql-command-options::option_mysql_binary-as-hex


--binary-as-hex (Display binary values in hexadecimal notation)


To disable... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MySQL-client-donnees-hexa-string-binary-as-hex-skip-binary-as-hex&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MySQL client données des colonnes blob affichée en hexa au lieu de string - binary-as-hex - skip-binary-as-hex&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MySQL-client-donnees-hexa-string-binary-as-hex-skip-binary-as-hex#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MySQL-client-donnees-hexa-string-binary-as-hex-skip-binary-as-hex#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/786</wfw:commentRss>
              </item>
          <item>
        <title>MySQL variables global session utilisateur</title>
        <link>https://dotclear.placeoweb.com/post/MySQL-variables-global-session-utilisateur</link>
        <guid isPermaLink="false">urn:md5:0b1eb955e4179cd73dfb0e42d8df81da</guid>
        <pubDate>Sun, 12 Jun 2016 12:01:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mysql</category>
                <description>&lt;p&gt;Accès aux variables de status, système, session, globales, utilisateur.&lt;/p&gt; &lt;p&gt;Server Status Variables utiliser SHOW STATUS Statement pour voir le status des variables.
Server System Variables utiliser SHOW VARIABLES Statement pour lister leur valeur ou le format avec 2 @ : @@event_scheduler et la porté globale ou session

@@GLOBAL.foreign_key_checks
@@SESSION.foreign_key_checks
@@foreign_key_checks (identique à @@SESSION.)... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MySQL-variables-global-session-utilisateur&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MySQL variables global session utilisateur&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MySQL-variables-global-session-utilisateur#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MySQL-variables-global-session-utilisateur#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/755</wfw:commentRss>
              </item>
          <item>
        <title>MariaDB variables</title>
        <link>https://dotclear.placeoweb.com/post/MariaDB-variables</link>
        <guid isPermaLink="false">urn:md5:5205aa10143b3977c75fcb01a3cb7a46</guid>
        <pubDate>Sun, 12 Jun 2016 12:00:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Accès aux variables de status, système, session, globales, utilisateur.&lt;/p&gt; &lt;p&gt;Server Status Variables utiliser SHOW STATUS pour voir le status des variables.
Server System Variables utiliser SHOW VARIABLES pour lister leur valeur ou le format avec 2 @ : @@event_scheduler
User-defined Variables avec un seul @ : @ma_variable


-- SHOW [GLOBAL | SESSION] STATUS [LIKE 'pattern' | WHERE expr]
SHOW STATUS; -- par défaut SESSION,... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MariaDB-variables&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MariaDB variables&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MariaDB-variables#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MariaDB-variables#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/678</wfw:commentRss>
              </item>
          <item>
        <title>Réplication MariaDB</title>
        <link>https://dotclear.placeoweb.com/post/R%C3%A9plication-MariaDB</link>
        <guid isPermaLink="false">urn:md5:12c8359ee561c90c92e126b3f60ba24f</guid>
        <pubDate>Sun, 05 Jun 2016 19:48:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Petites notes sur la réplication avec MariaDB&lt;/p&gt; &lt;p&gt;Quel serait la meilleure méthode de réplication ?

SBR : Statement Based Replication
RBR : Row Based Replication
MBR ? Mixed Based Replication



MariaDB



Binary Log Formats
Replication and Binary Log Server System Variables replicate_ignore_db
mysqld Options --binlog-ignore-db
Dynamic Replication Variables SET GLOBAL replicate_ignore_db =... &lt;a href=&quot;https://dotclear.placeoweb.com/post/R%C3%A9plication-MariaDB&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; Réplication MariaDB&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/R%C3%A9plication-MariaDB#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/R%C3%A9plication-MariaDB#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/677</wfw:commentRss>
              </item>
          <item>
        <title>MariaDB DEFAULT column VALUE</title>
        <link>https://dotclear.placeoweb.com/post/MariaDB-default-column-value</link>
        <guid isPermaLink="false">urn:md5:7d67cb721032f4cd274fb8bd365df374</guid>
        <pubDate>Tue, 10 May 2016 21:15:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>sql</category>
                <description>&lt;p&gt;How to retrieve default column value ?
Simply using the miscellaneous &lt;a href=&quot;https://mariadb.com/kb/en/mariadb/default&quot;&gt;DEFAULT(col_name)&lt;/a&gt; function.&lt;/p&gt; &lt;p&gt;UPDATE my_table SET my_col_1 = DEFAULT(my_col_1), my_field = DEFAULT(my_field) WHERE id = 123... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MariaDB-default-column-value&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MariaDB DEFAULT column VALUE&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MariaDB-default-column-value#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MariaDB-default-column-value#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/675</wfw:commentRss>
              </item>
          <item>
        <title>Android SQlite affectedRows</title>
        <link>https://dotclear.placeoweb.com/post/Android-SQlite-affectedRows</link>
        <guid isPermaLink="false">urn:md5:06a82daac5cf49d91aa9a4045347e897</guid>
        <pubDate>Sun, 01 May 2016 10:52:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>android</category>
                  <category>java</category>
                  <category>javaEE</category>
                  <category>php</category>
                  <category>sql</category>
                  <category>sqlite</category>
                <description>&lt;p&gt;Les INSERT/DELETE/UPDATE retourne the number of rows affected, mais pas les bons ! Pour résumer il retourne le nombre de row matching au critère WHERE.&lt;/p&gt; &lt;p&gt;ContentValues values = new ContentValues();
values.put(&quot;changed&quot;, changed ? &quot;1&quot; : &quot;0&quot;);
long affectedRows = database.update(&quot;my_table&quot;, values, &quot;id = ?&quot;, new String[]{Integer.toString(id)});

Sur une clé primaire avec un seul row attendu et existant, cette méthode, retourne toujours 1,

que la valeur d’origine soit différente
que la valeur... &lt;a href=&quot;https://dotclear.placeoweb.com/post/Android-SQlite-affectedRows&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; Android SQlite affectedRows&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/Android-SQlite-affectedRows#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/Android-SQlite-affectedRows#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/685</wfw:commentRss>
              </item>
          <item>
        <title>REPLACE INTO vs ON DUPLICATE KEY UPDATE</title>
        <link>https://dotclear.placeoweb.com/post/REPLACE-INTO-vs-ON-DUPLICATE-KEY-UPDATE</link>
        <guid isPermaLink="false">urn:md5:5a4a6a50e2fcc9de5a2af37d1046b985</guid>
        <pubDate>Mon, 04 Apr 2016 00:00:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Which (non-standard) statement is better faster?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;REPLACE INTO ...&lt;/li&gt;
&lt;li&gt;INSERT INTO ... ON DUPLICATE KEY UPDATE ...&lt;/li&gt;
&lt;/ul&gt; &lt;p&gt;REPLACE INTO my_table (col_1, col_2, col_3, col_4) VALUES 
('row1_valA', 'row1_valB', 'row1_valC', 'row1_valD'),
('row2_valA', 'row2_valB', 'row2_valC', 'row2_valD');

INSERT INTO my_table (col_1, col_2, col_3, col_4) VALUES
('row1_valA', 'row1_valB', 'row1_valC', 'row1_valD'),
('row2_valA', 'row2_valB', 'row2_valC', 'row2_valD')
ON DUPLICATE KEY... &lt;a href=&quot;https://dotclear.placeoweb.com/post/REPLACE-INTO-vs-ON-DUPLICATE-KEY-UPDATE&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; REPLACE INTO vs ON DUPLICATE KEY UPDATE&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/REPLACE-INTO-vs-ON-DUPLICATE-KEY-UPDATE#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/REPLACE-INTO-vs-ON-DUPLICATE-KEY-UPDATE#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/665</wfw:commentRss>
              </item>
          <item>
        <title>sql occurence char count</title>
        <link>https://dotclear.placeoweb.com/post/sql-occurence-char-count</link>
        <guid isPermaLink="false">urn:md5:cbbbb78949b6823141f22c91690eff77</guid>
        <pubDate>Tue, 08 Mar 2016 20:33:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Comment compter le nombre d’occurrence d'un caractère dans une colonne ?&lt;/p&gt;

&lt;pre class=&quot;brush: sql&quot;&gt;SET @string = &amp;quot;Bonjour &amp;quot;&amp;quot;Mr Vinal&amp;quot;&amp;quot;; il fait beau l'été, l'automne et l'hivers, n'est ce pas ?&amp;quot;;
SELECT 
SUM( LENGTH(@string ) ) AS total_length,
SUM( LENGTH(@string) - LENGTH(replace(@string, ',', '')) ) AS coma_virgule, 
SUM( LENGTH(@string) - LENGTH(replace(@string, '''', '')) ) AS quote_cote, 
SUM( LENGTH(@string) - LENGTH(replace(@string, '&amp;quot;', '')) ) AS double_quote_cote, 
SUM( LENGTH(@string) - LENGTH(replace(@string, ';', '')) ) AS semicolon_point_virgule
;
/*
+--------------+--------------+------------+-------------------+-------------------------+
| total_length | coma_virgule | quote_cote | double_quote_cote | semicolon_point_virgule |
+--------------+--------------+------------+-------------------+-------------------------+
|           79 |            2 |          4 |                 2 |                       1 |
+--------------+--------------+------------+-------------------+-------------------------+
*/&lt;/pre&gt; &lt;p&gt;D'autres liens :

http://stackoverflow.com/questions/...
http://stackoverflow.com/questions/...
https://docs.oracle.com/cd/B28359_0...
http://sqlblog.com/blogs/adam_macha...
http://rebustechnologies.com/using-...
http://stanbiron.com/2010/07/29/Sim...... &lt;a href=&quot;https://dotclear.placeoweb.com/post/sql-occurence-char-count&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; sql occurence char count&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/sql-occurence-char-count#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/sql-occurence-char-count#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/660</wfw:commentRss>
              </item>
          <item>
        <title>MariaDB fonctions de date et de temps</title>
        <link>https://dotclear.placeoweb.com/post/MariaDB-fonctions-de-date-et-de-temps</link>
        <guid isPermaLink="false">urn:md5:40dd58edc3e95f71a5aad98507fb566d</guid>
        <pubDate>Mon, 28 Dec 2015 21:21:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>sql</category>
                <description>&lt;p&gt;Comment gérer ses dates avec MariaDB, soustraire des dates, ajouter des intervalles de temps, ...&lt;/p&gt;


&lt;p&gt;... extraire les secondes, minutes, jours, semaines, mois, ans...&lt;/p&gt; &lt;p&gt;Au même titre que MySQL fonctions de date et de temps, voici comment gérer les dates et times avec MariaDB, selon Date and Time Functions et Date and Time Data Types

MariaDB&gt; SELECT VERSION(), CURRENT_TIMESTAMP, CURRENT_DATE, CURRENT_TIME, UNIX_TIMESTAMP();... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MariaDB-fonctions-de-date-et-de-temps&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MariaDB fonctions de date et de temps&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MariaDB-fonctions-de-date-et-de-temps#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MariaDB-fonctions-de-date-et-de-temps#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/654</wfw:commentRss>
              </item>
          <item>
        <title>The last packet successfully received from the server was X milliseconds ago.  The last packet sent successfully to the server was Y milliseconds ago.</title>
        <link>https://dotclear.placeoweb.com/post/The-last-packet-successfully-received-from-the-server-was-milliseconds-ago.-The-last-packet-sent-successfully-to-the-server-was-milliseconds-ago.</link>
        <guid isPermaLink="false">urn:md5:3c30aca11bbab01df3a3161b7fe5bbf4</guid>
        <pubDate>Tue, 01 Dec 2015 06:21:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>java</category>
                  <category>javaEE</category>
                  <category>jboss</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;The last packet successfully received from the server was X milliseconds ago.  The last packet sent successfully to the server was Y milliseconds ago.&lt;/p&gt;


&lt;p&gt;MySQL server has gone away&lt;/p&gt; &lt;p&gt;2015-12-01 09:01:45,010 FATAL (EJB default - 7) class com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 13 973 milliseconds ago.  The last packet sent successfully to the server was 3 milliseconds... &lt;a href=&quot;https://dotclear.placeoweb.com/post/The-last-packet-successfully-received-from-the-server-was-milliseconds-ago.-The-last-packet-sent-successfully-to-the-server-was-milliseconds-ago.&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; The last packet successfully received from the server was X milliseconds ago.  The last packet sent successfully to the server was Y milliseconds ago.&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/The-last-packet-successfully-received-from-the-server-was-milliseconds-ago.-The-last-packet-sent-successfully-to-the-server-was-milliseconds-ago.#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/The-last-packet-successfully-received-from-the-server-was-milliseconds-ago.-The-last-packet-sent-successfully-to-the-server-was-milliseconds-ago.#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/649</wfw:commentRss>
              </item>
          <item>
        <title>sql_log.sh</title>
        <link>https://dotclear.placeoweb.com/post/sql_log.sh</link>
        <guid isPermaLink="false">urn:md5:91450c1834bf455b54e525f3613b2b02</guid>
        <pubDate>Sat, 19 Sep 2015 19:15:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Petit script pour activer les logs des requêtes SQL (MariaDB, MySQL).&lt;/p&gt;


&lt;p&gt;Usage :&lt;/p&gt;


&lt;p&gt;./sql_log.sh OFF&lt;/p&gt;


&lt;p&gt;./sql_log.sh ON&lt;/p&gt;


&lt;p&gt;tail -f /var/lib/mysql/hostname.log&lt;/p&gt; &lt;p&gt;~# vim sql_log.sh

#!/bin/bash

#echo $1
#echo $*
#echo $@
#echo $#

# Le nombre d'arguments : $#
#echo $#

var_on_off=&quot;&quot;;

if [ $# = 1 ]
then
        if [ $1 = &quot;ON&quot; ]
        then
                var_on_off=$1;
        elif [ $1 = &quot;OFF&quot; ]
        then
                var_on_off=$1;
        else
                echo &quot;Un seul ARG : ON/OFF&quot;;... &lt;a href=&quot;https://dotclear.placeoweb.com/post/sql_log.sh&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; sql_log.sh&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/sql_log.sh#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/sql_log.sh#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/704</wfw:commentRss>
              </item>
          <item>
        <title>MySQL create command SELECT/INSERT/UPDATE</title>
        <link>https://dotclear.placeoweb.com/post/MySQL-create-command-SELECT/INSERT/UPDATE</link>
        <guid isPermaLink="false">urn:md5:065f55763647c25d4a1640c4a318420b</guid>
        <pubDate>Sun, 18 Jan 2015 23:30:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Commandes SQL pour générer des statements SELECT, INSERT, REPLACE, UPDATE de vos tables, dans le but d'avoir les requêtes déjà prêtes avec la liste de vos champs.&lt;/p&gt; &lt;p&gt;/* 
`information_schema`.`COLUMNS`
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME
ORDINAL_POSITION
COLUMN_DEFAULT
IS_NULLABLE
DATA_TYPE
CHARACTER_MAXIMUM_LENGTH
CHARACTER_OCTET_LENGTH
NUMERIC_PRECISION
NUMERIC_SCALE
CHARACTER_SET_NAME
COLLATION_NAME
COLUMN_TYPE
COLUMN_KEY
EXTRA
PRIVILEGES
COLUMN_COMMENT
*/


-- SET [SESSION | GLOBAL]... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MySQL-create-command-SELECT/INSERT/UPDATE&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MySQL create command SELECT/INSERT/UPDATE&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MySQL-create-command-SELECT/INSERT/UPDATE#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MySQL-create-command-SELECT/INSERT/UPDATE#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/628</wfw:commentRss>
              </item>
          <item>
        <title>MariaDB</title>
        <link>https://dotclear.placeoweb.com/post/MariaDB</link>
        <guid isPermaLink="false">urn:md5:b3ed8e47c78af314480c704feba895dc</guid>
        <pubDate>Mon, 31 Mar 2014 11:18:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;&lt;a href=&quot;https://mariadb.org/&quot;&gt;MariaDB&lt;/a&gt; remplaçant de &lt;a href=&quot;https://dotclear.placeoweb.com/tag/mysql&quot;&gt;MySQL&lt;/a&gt; ?&lt;/p&gt; &lt;p&gt;Au 2014-03-31, MariaDB lance sa nouvelle version stable : MariaDB 10.0.10


Les commandes client mysql/mariadb


Par exemple pour le lancer sans la complétion et avec demande du mot de passe, mysql --no-auto-rehash -p


Pour changer le prompt :
MariaDB [(none)]&gt; prompt MariaDB&gt;
PROMPT set to 'MariaDB&gt; '
MariaDB&gt;
PROMPT \U &gt;
root@localhost &gt;


Et le... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MariaDB&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MariaDB&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MariaDB#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MariaDB#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/606</wfw:commentRss>
              </item>
      </channel>
</rss>
