早上阿伦拉杰
我希望这有帮助 ?
我正在运行Mysql / MariaDB
MariaDB [(none)]> SHOW VARIABLES LIKE "%version%";
+-------------------------+-----------------+
| Variable_name | Value |
+-------------------------+-----------------+
| innodb_version | 5.6.25-73.1 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 10.0.21-MariaDB |
| version_comment | MariaDB Server |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
| version_malloc_library | system |
+-------------------------+-----------------+
8 rows in set (0.00 sec)
运行示例
As mysql Admin
mysql -u USERNAME -p
CREATE USER 'test'@'localhost' IDENTIFIED BY 'test';
CREATE DATABASE test;
GRANT ALL ON test.* TO 'test'@'localhost';
退出然后登录为测试
mysql -u test -p
密码是测试
然后
CREATE TABLE test.td6(ts6 timestamp(6));
INSERT INTO test.td6 VALUES ('2016-01-22 17:44:53.342757');
插入的值是您要插入mysql的时间戳格式.
祝一切顺利