MySQLでtimestampのデフォルト設定を変更する.
# MySQLでtimestampのデフォルト設定を変更する.
timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
> alter table TABLE_NAME modify COLUMN_NAME timestamp default '0000-00-00 00:00:00';
timestamp | NO | | 0000-00-00 00:00:00 | |
MySQLでテーブル定義を表示する.いくつかあるけれど一番見やすいものを.
# MySQLでテーブル定義を表示する.いくつかあるけれど一番見やすいものを.
> desc TABLE_NAME;
MySQLで現在のタイムスタンプを取得する.
# MySQLで現在のタイムスタンプを取得する.
> select current_timestamp();
+---------------------+
| current_timestamp() |
+---------------------+
| 2016-10-01 16:48:47 |
+---------------------+
1 row in set (0.00 sec)
参考: http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html
Vagrantで"/sbin/mount.vboxsf: mounting failed with the error: No such device"というエラーが出たので対応した.
# Vagrantで"/sbin/mount.vboxsf: mounting failed with the error: No such device"というエラーが出たので対応した.
$ vagrant up
$ vagrant ssh
$ sudo yum install -y kernel-devel
$ uname -r
> 2.6.32-504.el6.x86_64
$ echo $KERN_DIR
>
$ export KERN_DIR=`uname -r`
$ echo $KERN_DIR
> 2.6.32-504.el6.x86_64
$ sudo yum update -y
$ exit
$ vagrant reload