[[FrontPage]]~ CONTENTS #contents ---- Lastmodified &lastmod; ---- *sql_mode [#fce423d3] http://wiki.ispirer.org/sqlways/troubleshooting-guide/mysql/import/zero-date-not-accepted こちらがOpenPNE3系が、正常稼働中ののMySQLのsql-mode Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 38583 Server version: 5.1.68-log FreeBSD port: mysql-server-5.1.68 Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select @@sql_mode; +------------+ | @@sql_mode | +------------+ | | +------------+ 1 row in set (0.00 sec) こちらが、最新版(2013-03-25 16:18:17 時点での)MySQL on FreeBSD-9.1R OpenPNE3系で、新規メンバー登録が出来ない状態のもの。 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.10-log Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select @@sql_mode; +--------------------------------------------+ | @@sql_mode | +--------------------------------------------+ | STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION | +--------------------------------------------+ 1 row in set (0.00 sec) コマンド打つと、 mysql> set sql_mode=''; Query OK, 0 rows affected (0.00 sec) mysql> select @@sql_mode; +------------+ | @@sql_mode | +------------+ | | +------------+ 1 row in set (0.00 sec) mysql> root@g7:/usr/local/www/apache22/data/OP36B # /usr/local/etc/rc.d/mysql-server restart # /usr/local/etc/rc.d/mysql-server restart Stopping mysql. Waiting for PIDS: 87807. Starting mysql. root@g7:/usr/local/www/apache22/data/OP36B # とかすると、また元の設定へもどる・・・??? *sql_modeが反映されない! [#j57a0152] /usr/local/etc/my.cnfに、 sql_mode="" とか書き込んで、# /usr/local/etc/rc.d/mysql-server restart しても、一向に mysql> select @@sql_mode; に反映されません。で、 root@g7:/root # locate my.cnf /usr/home/Backups/222_all/usr/local/etc/my.cnf /usr/local/etc/my.cnf /usr/local/my.cnf したら、なんと、/usr/local/my.cnfに、 [mysqld] sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES なぁ~んてのがあるやん。で、全部コメントアウトしたった。 で、/usr/local/etc/my.cnf へは、 [mysqld] sql_mode= sql_mode="" のどちらで記述しても、 mysql> select @@sql_mode; +------------+ | @@sql_mode | +------------+ | | +------------+ 1 row in set (0.00 sec) となりました。ふぅ・・・ ---- 総 access &counter(total);:本日 &counter(today);:昨日 &counter(yesterday); #counter([total|today|yesterday]);