- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2022-01-27T01:39:56+00:00","default:wikiadmin","wikiadmin")
#author("2022-02-01T00:28:37+00:00","default:wikiadmin","wikiadmin")
#contents
*Mariadbからの移行 [#wf419fbd]
-予めDBはUTF-8で用意しておく(デフォルトのエンコーディングではバイト数になるため)
su - postgres
createuser -U postgres appdbuser --pwprompt -S -R -D
psql
create database cakephp OWNER = appdbuser TEMPLATE = template0 ENCODING = 'UTF8';
create database pg_cakephp OWNER = appdbuser TEMPLATE = template0 ENCODING = 'UTF8';
**ツール pgloader [#t6b6572f]
su - postgres
build/bin/pgloader mysql://user:password@localhost/DB_NAME pgsql:///DB_NAME
build/bin/pgloader mysql://user:password@localhost/DB_NAME pgsql:///pg_cakephp
timeoutとか結構失敗確立高いのでパラメータ調整必要そう。
**Mariadb側の設定変更 [#r5a90c48]
-read/writeともに60でも失敗したので600にした。トータル11分かかっているのでこのぐらいが適正値かと
MariaDB [cakephp]> show global variables like "%net%timeout%";
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| net_read_timeout | 30 |
| net_write_timeout | 60 |
| slave_net_timeout | 3600 |
+-------------------+-------+
3 rows in set (0.01 sec)
MariaDB [(none)]> SET GLOBAL net_read_timeout = 60;