<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" >
  <channel>
  <title>ちょっとしたノート</title>
  <link>https://notebookmemory.blog.shinobi.jp/</link>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="https://notebookmemory.blog.shinobi.jp/RSS/" />
  <description>ちょっとしたノートです
皆さんの役に立つかどうかは分かりません</description>
  <lastBuildDate>Fri, 04 Jul 2025 07:01:41 GMT</lastBuildDate>
  <language>ja</language>
  <copyright>© Ninja Tools Inc.</copyright>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" />

    <item>
    <title>tar コマンドで特定のディレクトリを除外</title>
    <description>
    <![CDATA[普段使わないけど、たまに使うときに、あれ？ってなるので、久しぶりにメモ<br />
<br />
例えば html/subdir1 と html/subdir2　<br />
を除外してアーカイブを作成したい場合は、--exclude オプションを使う。<br />
<br />
tar --exclude='html/subdir1' --exclude='html/subdir2' -cf - html | gzip -c &gt; html.tar.gz<br />
<br />
※&nbsp;<code data-start="440" data-end="451">--exclude</code> のパスは、<code data-start="457" data-end="462">tar</code> に渡すパスと相対パスになる<br />
<br />
<br />
除外対象が多いなら、除外リストをファイルにして<br />
<br />

<div>cat &gt; exclude-list.txt &lt;&lt;EOF</div>
<div>html/subdir1</div>
<div>html/subdir2</div>
<div>EOF</div>
<div><br />

<div>tar --exclude-from=exclude-list.txt -cf - html | gzip -c &gt; html.tar.gz</div>
</div>
<div><br />
とすることも出来る</div>]]>
    </description>
    <category>OSコマンド</category>
    <link>https://notebookmemory.blog.shinobi.jp/os%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/tar%20%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%A7%E7%89%B9%E5%AE%9A%E3%81%AE%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%82%92%E9%99%A4%E5%A4%96</link>
    <pubDate>Fri, 04 Jul 2025 07:01:41 GMT</pubDate>
    <guid isPermaLink="false">notebookmemory.blog.shinobi.jp://entry/358</guid>
  </item>
    <item>
    <title>httpdを監視</title>
    <description>
    <![CDATA[古い環境なだけに面倒なことばっかり起きる<br />
<br />
やたら、httpdが元旦に落ちているという謎な現象<br />
<br />
そんなわけで、httpdも監視対象にする<br />
<br />

<div>vi /etc/monit.d/httpd</div>
<div></div>
<div>check process httpd with pidfile /var/run/httpd/httpd.pid</div>
<div>&nbsp; start program = "/bin/systemctl start httpd" with timeout 60 seconds</div>
<div>&nbsp; stop program&nbsp; = "/bin/systemctl stop httpd"</div>
<div>&nbsp; if failed port 80 for 2 cycles then restart</div>
<div>&nbsp; if failed port 443 for 2 cycles then restart</div>
<div>&nbsp; if 5 restarts within 5 cycles then timeout</div>
<div></div>
<div></div>
<div>check processの行でpidファイルの存在確認。pidファイルが存在しないか、実行中のプロセスのPID番号が含まれていない場合startメソッドを呼び出す。<br />
<br />
</div>
<div>サービスを起動するコマンド。後ろの「with timeout 60 seconds」は起動タイムアウト時間を指定。</div>
<div><br />
サービスを停止するコマンド。<br />
<br />
</div>
<div>80ポートへ2回連続でアクセスできなければサービスを再起動する。<br />
<br />
</div>
<div>443ポートへ2回連続でアクセスできなければサービスを再起動する。<br />
<br />
</div>
<div>5サイクル中5回再起動が行われた場合にそれ以上再起動を行わず、監視を止める。(再起動できない場合いつまでも再起動を繰り返さない処置です。)<br />
<br />
https://www.conversion.co.jp/tecblog/20210107/<br />
<br />
</div>]]>
    </description>
    <category>環境</category>
    <link>https://notebookmemory.blog.shinobi.jp/%E7%92%B0%E5%A2%83/httpd%E3%82%92%E7%9B%A3%E8%A6%96</link>
    <pubDate>Tue, 07 Jan 2025 12:33:58 GMT</pubDate>
    <guid isPermaLink="false">notebookmemory.blog.shinobi.jp://entry/357</guid>
  </item>
    <item>
    <title>MySQL メモ 統計情報</title>
    <description>
    <![CDATA[前回の記事の対応で、調べたことをメモとして<br />
<br />
MySQLでは、テーブルにあるレコードの<span style="color: #ff0000;"><strong>10%を超えるレコードに</strong></span><br />
<span style="color: #ff0000;"><strong>変更を加えられた</strong></span>場合、該当のテーブルの<strong><span style="color: #ff0000;">統計情報（カーディナリティ）が再生成</span></strong>される。<br />
<br />
構成オプション：innodb_stats_auto_recalcがONの場合。<br />
デフォルトは、ON<br />
<br />
Analyzeする場合、<br />
analyze table テーブル名; 以外には、<strong>mysqlcheck</strong>を使う<br />
（mysqlcheckは、MySQLのテーブルメンテナンス、修復を行なうことができる。
<div>内部的には、<strong>CHECK, ANALYZE, REPAIR, OPTIMIZE</strong>のコマンドを利用して作業を行ない、</div>
また、MySQLを稼働しているときに、実行することができる。）<br />
<br />
<br />

<h4>全データベースを確認する場合</h4>
<div><strong>mysqlcheck -a -u root -p --all-databases</strong></div>
<h4>特定データベースのみを確認する場合</h4>
<div><strong>mysqlcheck -a DB名 -u root -p</strong></div>
<div><br />
ついでに
<h3>check（テーブルのエラーチェック）</h3>
<h4>全データベースを確認する場合</h4>
<div>mysqlcheck -c -u root -p --all-databases</div>
<h4>特定データベースのみを確認する場合</h4>
<div>mysqlcheck -c DB名 -u root -p</div>
</div>
<div><br />

<h3>optimize（テーブルの最適化）</h3>
<h4>全データベースを確認する場合</h4>
<div>mysqlcheck -o -u root -p --all-databases</div>
<h4>特定データベースのみを確認する場合</h4>
<div>mysqlcheck -o DB名&nbsp;-u root -p</div>
</div>
<div><br />

<h3>repair（テーブルの修復）</h3>
<h4>全データベースを修復する場合</h4>
<div>mysqlcheck -r -u root -p --all-databases</div>
<div></div>
<h4>特定データベースのみを修復する場合</h4>
<div>mysqlcheck -r DB名 -u root -p</div>
<div></div>
<h3>エラーチェックと修復を組み合わせて実行する場合</h3>
<div>mysqlcheck --auto-repair -c -o DB名 -u root -p</div>
</div>]]>
    </description>
    <category>メモ</category>
    <link>https://notebookmemory.blog.shinobi.jp/%E3%83%A1%E3%83%A2/mysql%20%E3%83%A1%E3%83%A2%20%E7%B5%B1%E8%A8%88%E6%83%85%E5%A0%B1</link>
    <pubDate>Mon, 27 May 2024 09:34:17 GMT</pubDate>
    <guid isPermaLink="false">notebookmemory.blog.shinobi.jp://entry/356</guid>
  </item>
    <item>
    <title>MySQL インデックスサイズ</title>
    <description>
    <![CDATA[めちゃくちゃハマったので、ここに記載<br />
<br />
現行サーバのOSの期限が近付いたため、サーバの移行が行われました。<br />
それにともない、DB（MySQL）も、地味にバージョンアップが実施された。<br />
<br />
マイナーバージョンアップにより、SQLが厳密化され、型が違うカラムをJOINの条件にしていた部分をCONVERT()関数をつかって、キャストしたり。。。<br />
CONVERT(数値カラム USING binary)=文字列カラム　みたいな。。。<br />
型を意識しないで結合して作った奴出て来いよ！と思いつつ<br />
<br />
それ以外は、プログラムの変更は行われていないのに、サーバ移行が行われ、パフォーマンスが大幅にダウン<br />
その原因究明に、駆り出され、１週間<br />
<br />
EXPLAINなどつけて、インデックス状況を確認し、SQLをチューニングしたり<br />
でも、チューニングの結果が出ないの繰り返し。<br />
<br />
幸いにも、旧サーバが残っていたので、新旧を比べることに。<br />
<br />
新サーバのほうで、今まで使っていたインデックスが効いていない！<br />
なんでだ？なんでだ？と試行錯誤。<br />
（移管した奴が調べろよっと思いつつ、ストレスが溜まる１週間）<br />
<br />
推測はインデックスが壊れているでは？、インデックスの統計情報がおかしいのでは？<br />
と思いつつ、壊れているパターンから調査。<br />
壊れてはいなそう。。。ということで、統計情報を確認。<br />
<br />
差がありました。。。<br />
<br />
確認したSQLとして、<br />
SELECT database_name , table_name , last_update , stat_value , index_name ,<br />
(stat_value&nbsp;* @@innodb_page_size) / 1024 / 1024 as size_mb<br />
FROM mysql.innodb_index_stats<br />
WHERE database_name='データベース名' AND table_name='テーブル名' AND stat_name='size';<br />
<br />
結果：size_mbが全然違うじゃん！<br />
<br />
ということで、<br />
<br />
ANALYZE TABLE テーブル名　を実施<br />
<br />
再度、サイズを確認し、更新されたことを確認<br />
プログラムを動かしてみてくれ～とお願いしたら、１秒でレスポンスが返ってきた！と<br />
苦労が報われるお返事がきました。<br />
<br />
めちゃくちゃハマったというか、時間を使った。。。]]>
    </description>
    <category>DB&amp;SQL</category>
    <link>https://notebookmemory.blog.shinobi.jp/db-sql/mysql%20%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9%E3%82%B5%E3%82%A4%E3%82%BA</link>
    <pubDate>Fri, 24 May 2024 09:29:06 GMT</pubDate>
    <guid isPermaLink="false">notebookmemory.blog.shinobi.jp://entry/355</guid>
  </item>
    <item>
    <title>MySQL　tinyintがbooleanになる</title>
    <description>
    <![CDATA[cakephp（cakephp3）で、<br />
MySQLで作ったテーブルに、tinyint(1)のカラムを取得してみたところ、<br />
tinyintではなく、booleanになっていた<br />
<br />
cakephpの設定が足りないのか？と思いながら、<br />
色々模索していた結果、<br />
MySQLの内部的に、tinyint(1)をbooleanとして使っているとのこと。<br />
<br />
<br />
JAVAでやっていたときって、こんなことあったっけかな？と思いつつ<br />
んー。。。。って感じです。<br />
<br />
つまらないことにハマったので、ここに残す。]]>
    </description>
    <category>DB&amp;SQL</category>
    <link>https://notebookmemory.blog.shinobi.jp/db-sql/mysql%E3%80%80tinyint%E3%81%8Cboolean%E3%81%AB%E3%81%AA%E3%82%8B</link>
    <pubDate>Wed, 01 May 2024 07:01:45 GMT</pubDate>
    <guid isPermaLink="false">notebookmemory.blog.shinobi.jp://entry/354</guid>
  </item>
    <item>
    <title>Linux CPU負荷やメモリ負荷の履歴</title>
    <description>
    <![CDATA[最近、使う機会が増えて、なんだっけ？と思うことが増えてきたので、<br />
ここに残す<br />
<br />
普段は使わないsarコマンドで、過去のCPU負荷やメモリ負荷を調べる<br />
<br />
サーバにsarコマンドが入っていると、後々救われるということも痛感したので、<br />
もしインストールされていなかったら、インストールしておいたほうがいい。<br />
<br />
インストールされているか確認<br />

<div># rpm -qa | grep sysstat<br />
<br />
インストールされていなかったら、インストールする</div>
<div># yum -y install sysstat<br />
<br />

<div>念のためcron設定確認</div>
<div>#cat /etc/cron.d/sysstat<br />
<br />
</div>
<div># Run system activity accounting tool every 10 minutes</div>
<div>*/10 * * * * root /usr/lib64/sa/sa1 1 1</div>
<div># 0 * * * * root /usr/lib64/sa/sa1 600 6 &amp;</div>
<div># Generate a daily summary of process accounting at 23:53</div>
<div>53 23 * * * root /usr/lib64/sa/sa2 -A<br />
<br />

<div><strong>CPUリソースを確認</strong>するときは「<strong>sar -p</strong>」を使用</div>
<div></div>
<div><strong>メモリを確認</strong>するときは「<strong>sar -r</strong>」を使用</div>
<div></div>
<div>sarのデータファイルは/var/log/sa　の中にあり、1ファイル/日で生成され</div>
<div>オプションの-fでファイルを指定する</div>
<div></div>
<div>sar -p -f /var/log/sa/sa02</div>
<div><br />
他のオプション<br />

<div># sar -A&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;全情報表示</div>
<div># sar -q&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;loadaverage</div>
<div># sar -n DEV&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;送信／受信パケットに関する情報</div>
<div># sar -n EDEV&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; エラーパケットに関する情報</div>
<div># sar -u&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CPUの利用状況。</div>
<div># sar -b&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ディスクI/Oの使用状況</div>
<div># sar -r&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;メモリとスワップの使用状況</div>
<div># sar -W&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;秒当たりのスワップ情報</div>
<div># sar -s time&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 指定時間以降のデータ</div>
<div># sar -e time&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 指定時間までのデータ</div>
<br />
なんだっけ？って思うといつも参考にさせて頂いている<br />
https://every-rating.com/vps/sar.html<br />
https://tech-it.r-net.info/server/command/329/<br />
<br />
</div>
</div>
</div>]]>
    </description>
    <category>環境</category>
    <link>https://notebookmemory.blog.shinobi.jp/%E7%92%B0%E5%A2%83/linux%20cpu%E8%B2%A0%E8%8D%B7%E3%82%84%E3%83%A1%E3%83%A2%E3%83%AA%E8%B2%A0%E8%8D%B7%E3%81%AE%E5%B1%A5%E6%AD%B4</link>
    <pubDate>Tue, 06 Feb 2024 07:19:01 GMT</pubDate>
    <guid isPermaLink="false">notebookmemory.blog.shinobi.jp://entry/353</guid>
  </item>
    <item>
    <title>WSLのUbuntuにLaravel9</title>
    <description>
    <![CDATA[WSLのUbuntuにLaravel9環境を作るため<br />
<br />
https://qiita.com/y_sone/items/2bf510e551cd14d22042<br />
<br />
を参考に構築してました。<br />
<br />
構築後に<br />
$./vendor/bin/sail up<br />
<br />
と実行した<br />
Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:1025 -&gt; 0.0.0.0:0: listen tcp 0.0.0.0:1025: bind: An attempt was made to access a socket in a way forbidden by its access permissions.<br />
<br />
というエラーが。。。<br />
ポート：80 , 3306 なら、直ぐにわかるけど、1025ポートってなんだよ<br />
IISが入っているのか？と思い、調べても入っておらず。<br />
<br />
検索しても、なかなかそれらしきものが出てこず、四苦八苦<br />
<br />
netstatで調べても、ポート1025を使っているプロセスが見当たらない<br />
<br />
Dockerがいけないのかなと思い<br />
$docker compose up -d<br />
を実行すると<br />

<div>WARN[0000] The "WWWGROUP" variable is not set. Defaulting to a blank string.</div>
<div>WARN[0000] The "WWWUSER" variable is not set. Defaulting to a blank string.</div>
<div>[+] Running 5/5</div>
<div>&nbsp;✔ Container example-app-selenium-1&nbsp; &nbsp; &nbsp; Running&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.0s</div>
<div>&nbsp;✔ Container example-app-redis-1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Running&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.0s</div>
<div>&nbsp;✔ Container example-app-mysql-1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Running&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.0s</div>
<div>&nbsp;✔ Container example-app-meilisearch-1&nbsp; &nbsp;Running&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.0s</div>
<div>&nbsp;✔ Container example-app-laravel.test-1&nbsp; Recreated&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1.3s</div>
<div>&nbsp;⠋ Container example-app-mailpit-1&nbsp; &nbsp; &nbsp; &nbsp;Starting&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.0s</div>
<div>Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:1025 -&gt; 0.0.0.0:0: listen tcp 0.0.0.0:1025: bind: An attempt was made to access a socket in a way forbidden by its access permissions.<br />
<br />
example-app-mailpit-1 に問題がありそう<br />
docker-compose.ymlのバックアップを取り、docker-compose.ymlを編集<br />
&nbsp;- '${FORWARD_MAILPIT_PORT:-1025}:1025'<br />
となっていた部分を<br />
&nbsp;- '${FORWARD_MAILPIT_PORT:-587}:1025'<br />
<br />
と変更して再度、sail up<br />
<br />
起動した！！！<br />
結果としては、なんだよって感じだけど、なんで1025が起動しなかったのか<br />
ポートがデフォルト潰されていて、開放しなかったからいけない。とか？<br />
<br />
面倒だから、これでいいや</div>]]>
    </description>
    <category>環境</category>
    <link>https://notebookmemory.blog.shinobi.jp/%E7%92%B0%E5%A2%83/wsl%E3%81%AEubuntu%E3%81%ABlaravel9</link>
    <pubDate>Thu, 18 Jan 2024 10:47:54 GMT</pubDate>
    <guid isPermaLink="false">notebookmemory.blog.shinobi.jp://entry/352</guid>
  </item>
    <item>
    <title>MySQLの実行中SQLを強制終了</title>
    <description>
    <![CDATA[mysql コマンドで、mysqlにログイン<br />
<br />
show full processlist;<br />
<br />
で実行されているSQLの全文が表示される<br />
<br />
show full processlist \G;<br />
<br />
末尾に\Gを付け加えるとクエリ毎に分割されて、表示される<br />
<br />
<br />

<div>時間がかかってそうなクエリ、負荷原因のクエリを</div>
<div></div>
<div>kill &lt;プロセスID&gt;</div>
<div></div>
<div>で強制終了させる</div>]]>
    </description>
    <category>DB&amp;SQL</category>
    <link>https://notebookmemory.blog.shinobi.jp/db-sql/mysql%E3%81%AE%E5%AE%9F%E8%A1%8C%E4%B8%ADsql%E3%82%92%E5%BC%B7%E5%88%B6%E7%B5%82%E4%BA%86</link>
    <pubDate>Fri, 12 Jan 2024 08:34:50 GMT</pubDate>
    <guid isPermaLink="false">notebookmemory.blog.shinobi.jp://entry/351</guid>
  </item>
    <item>
    <title>MySQL8 ではまったこと</title>
    <description>
    <![CDATA[MySQL８では、ちょいちょいハマるので<br />
<br />
ユーザのパスワード変更<br />

<div>update mysql.user set password=password('hogehoge') where user = 'mysqluser';<br />
<br />
とやっても、ダメ、<br />
<br />
</div>
<div>password()が使用できなくなっているみたい<br />
<br />
方法としては、<br />

<div>USE mysql;</div>
<div>ALTER USER 'mysqluser'@'localhost' identified BY 'hoge';<br />
<br />
とやるみたいでした。<br />
<br />
<br />

<div>PHPからMySQL8接続しようとしたら、</div>
<div></div>
<div>SQLSTATE[HY000][2054] The server requested authentication method unknown to the client</div>
<div><br />
MySQL 8〜ではデフォルトの認証方法が変更になっているようです。<br />
<br />

<div>use mysql</div>
<div></div>
<div>select user, host, plugin from user;</div>
<div><br />
pluginが、caching_sha2_passwordとなっているので変更<br />
<br />
alter user 'mysqluser'@'localhost' identified with mysql_native_password by 'パスワード';<br />
<br />
<span style="color: #888888;"><a href="https://motomotosukiyaki.com/mysql-from-php-server-requested-authentication-method-unknown-to-the-client" title="" target="_blank">ここを参考に</a></span></div>
</div>
</div>
</div>]]>
    </description>
    <category>DB&amp;SQL</category>
    <link>https://notebookmemory.blog.shinobi.jp/db-sql/mysql8%20%E3%81%A7%E3%81%AF%E3%81%BE%E3%81%A3%E3%81%9F%E3%81%93%E3%81%A8</link>
    <pubDate>Fri, 04 Mar 2022 04:53:12 GMT</pubDate>
    <guid isPermaLink="false">notebookmemory.blog.shinobi.jp://entry/350</guid>
  </item>
    <item>
    <title>mysqldump で件数指定</title>
    <description>
    <![CDATA[あまり使う用途はないかもしれないけど<br />
<br />
乱暴に記述すると<br />
<br />
mysqldump [DB名] --where="true limit 100" &gt; [出力ファイル名]<br />
<br />
とすれば、テーブルごとに100件分のデータが、出力ファイルに出力される。<br />
<br />
ちゃんと書くなら<br />
<br />
mysqldump -h [DBホスト名] -u [DBユーザー名] -p -t [DB名] [テーブル名] --where="true limit [出力件数]" &gt; [出力ファイル名]<br />
<br />
ですかね。]]>
    </description>
    <category>DB&amp;SQL</category>
    <link>https://notebookmemory.blog.shinobi.jp/db-sql/mysqldump%20%E3%81%A7%E4%BB%B6%E6%95%B0%E6%8C%87%E5%AE%9A</link>
    <pubDate>Thu, 27 Jan 2022 13:54:11 GMT</pubDate>
    <guid isPermaLink="false">notebookmemory.blog.shinobi.jp://entry/349</guid>
  </item>

    </channel>
</rss>