1963 件中 371 - 380 件を表示
« 前の 10 件 | 次の 10 件 »
Displaying posts with tag: MySQL (reset)
MySQL Shell dumpInstance の仕組みと8.0.22 わいわい会

MySQL Release note でわいわい言う勉強会 8.0.22 でLTしてきました。

MySQL Shell の dumpInstance の仕組み

MySQL Shell のバックアップ機能 dumpInstance がどのようにして、一貫性のあるバックアップを実現しているか説明しました。 8.0.21 までは FLUSH TALBES WITH READ LOCK を利用してロックをかける方式のみでしたが、 8.0.22 以降では、FTWRLが使えない場合は、LOCK TABLES を代替として利用するようになっています。

MySQL Shell dumpInstance の仕組み from

[さらに読む]
MySQL 8.0.22 DNS SRV レコードサポート

MySQL 8.0.22 の新機能で DNS SRV レコードのサポートというのがあったので試してみた。 https://dev.mysql.com/doc/refman/8.0/en/connecting-using-dns-srv.html

MySQLサーバー3台 (a.example.com, b.example.com, c.example.com)とそれに接続するためのクライアントの計4台を docker-compose で作成する。

Dockerfile

FROM ubuntu
RUN apt update
RUN apt install -y mysql-client libmysqlclient-dev gcc unbound bind9-dnsutils
RUN rm -f /etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
ENTRYPOINT /entrypoint.sh

docker-compose.yml

services:
  client:
    build: .
    hostname: client
    volumes:
      - ./resolv.conf:/etc/resolv.conf
      - ./unbound-example.conf:/etc/unbound/unbound.conf.d/example.conf
      - .:/work …
[さらに読む]
MySQL 8.0.22 のプリペアドステートメントの非互換

MySQL 8.0.22 のリリースノートによるとプリペアドステートメントまわりに非互換があるらしい。

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-22.html

For a prepared statement of the form SELECT expr1, expr2, ... FROM table ORDER BY ?, passing an integer value N for the parameter no longer causes ordering of the results by the Nth expression in the select list; the results are no longer ordered, as is expected with ORDER BY constant.

order by の引数をプレースホルダで与えても無視されるらしい。

試してみる。

8.0.21:

% docker run -p 13306:3306 --name mysql8021 -d -e MYSQL_ALLOW_EMPTY_PASSWORD=1 mysql:8.0.21
% docker exec -it mysql8021 mysql
mysql> create database test;
mysql> use test;
mysql> create table t (id int …
[さらに読む]
今日は、PythonでSQL 結果を綺麗に表示するパッケージ作り始めたの日。

目次

[さらに読む]
8.0.22でのprepared statementの挙動変化

概要

8.0.22のリリースノートを見るとprepared statementの挙動が変わっているらしい。

特にこれが気になったので、試してみる

For a prepared statement of the form SELECT expr1, expr2, ... FROM table ORDER BY ?, passing an integer value N for the parameter no longer causes ordering of the results by the Nth expression in the select list; the results are no longer ordered, as is expected with ORDER BY constant.

どうやら8.0.22からはSELECT expr1, expr2, ... FROM table ORDER BY ? といったクエリをprepareして、placeholderにselect listの番号を表す数値Nを指定する場合にsortが効かなくなるらしい

実験

8.0.21, …

[さらに読む]
MySQL 8.0.22のperformance_schema.error_logってエラーログのサイズと同じだけメモリを食うかも、5MBが上限かも

TL;DR

[さらに読む]
InnoDBのHistory list lengthの監視と原因スレッドの特定と

TL;DR

  • yt-healthckeckHistory list length ( trx_rseg_history_len ) の監視を追加した
    • --history-list-enable=1 すると有効になる(そのうちこっちをデフォルトにする…)
      • MySQL 5.6とそれ以降のみ対応、もう5.5は知らない…
    • デフォルトで10万がワーニング、50万をクリティカルにしてたんだけどあっさり食いちぎられた
      • その時の確認方法を主に

History list lengthとは(これは SHOW ENGINE INNODB STATUS の出力に載ってる用語、 information_schema.innodb_metrics 的には trx_rseg_history_len

[さらに読む]
今日は、docker-composeの苦労話の日。

目次

[さらに読む]
MySQL キャラクタセット(文字コード)の変換方法おさらい

ALTER TABLE xxx MODIFY 〜 でキャラクタセットを変換するのと、ALTER TABLE xxx CONVERT TO〜 で変換するのは、どう違うんだっけ? ってなったので、おさらい。

データベースのデフォルトキャラクタセット

MySQL はカラム単位でキャラクタセット( …

[さらに読む]
MySQL ShellのダンプとMDSへのインポート

はじめに

今回はずっと触りたかったMySQL Shellのダンプをやりつつ、 最後は前回作ったMDS相手にインポートしてみようかと思います。

MDSにインポートするためにはociクライアントの設定や、オブジェクトストレージが必要なので、それらを途中で設定していきます。

準備

1. 手元のdbdeployerで作成したMySQL8.0.21の環境に、公式が出しているテスト用データベースたちを適当に入れていきます。

自分はgit …

[さらに読む]
1963 件中 371 - 380 件を表示
« 前の 10 件 | 次の 10 件 »