MySQL5.7初始配置

Windows7 环境安装MySQL5.7配置命令

《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《

MYSQL_HOME D:\mysql\mysql-5.7.20-win32
MYSQL_CONNECTOR_HOME D:\mysql\mysql-connector-c-6.1.11-win32\bin

PATH ;%MYSQL_HOME%\bin;%MYSQL_CONNECTOR_HOME%\bin

####################配置文件开始###################

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

[mysqld]
character-set-server = utf8

bind-address = 0.0.0.0
port = 3306

basedir = "D:\mysql\mysql-5.7.20-win32/"
datadir = "D:\mysql\mysql-5.7.20-win32/data/"
tmpdir = "D:\mysql\mysql-5.7.20-win32/data/"
socket = "D:\mysql\mysql-5.7.20-win32/data/mysql.sock"
log-error = "D:\mysql\mysql-5.7.20-win32/data/mysql_error.log"

#server_id = 2

#skip-locking

max_connections = 100
table_open_cache = 256
query_cache_size = 1M
tmp_table_size = 32M
thread_cache_size = 8

innodb_data_home_dir = "D:\mysql\mysql-5.7.20-win32/data/"
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 128M
innodb_buffer_pool_size = 128M
innodb_log_file_size = 10M
innodb_thread_concurrency = 16
innodb-autoextend-increment = 1000

join_buffer_size = 128M
sort_buffer_size = 32M
read_rnd_buffer_size = 32M
max_allowed_packet = 32M
explicit_defaults_for_timestamp = true

sql-mode = "STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

#skip-grant-tables

#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[mysql]
default-character-set=utf8

[mysql.server]
default-character-set=utf8

[mysql_safe]
default-character-set=utf8

[client]

####################配置文件结束###################

mysqld remove
mysqld --install MySQL --defaults-file="D:\mysql\mysql-5.7.20-win32\my.ini"
mysqld --initialize
net start MySQL
net stop mysql

初始的随机密码可以在日志文件中找到(log-error = "D:\mysql\mysql-5.7.20-win32/data/mysql_error.log")

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

安装完mysql 之后,登陆以后,不管运行任何命令,总是提示这个
step 1: SET PASSWORD = PASSWORD('your new password');
step 2: ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
step 3: flush privileges;

完成以上三步退出再登,使用新设置的密码就行了,以上除了红色的自己修改成新密码外,其他原样输入即可
参考1: https://dev.mysql.com/doc/refman/5.6/en/alter-user.html
参考2: http://dev.mysql.com/doc/refman/5.7/en/password-expiration-policy.html
参考3: http://stackoverflow.com/questions/33467337/reset-mysql-root-password-using-alter-user-statement-after-install-on-mac

select user,host,authentication_string,password_expired from mysql.user;
update mysql.user set authentication_string=password('qwe123') where user='root' and host='localhost';
alter user 'root'@'localhost' identified by 'qwe123';
FLUSH PRIVILEGES;

》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》

MariaDB 安装配置

下载地址 http://downloads.mariadb.com/MariaDB/mariadb-10.2.11/winx64-packages/

  1. # Example MariaDB config file for large systems.
  2. #
  3. # This is for a large system with memory = 512M where the system runs mainly
  4. # MariaDB.
  5. #
  6. # MariaDB programs look for option files in a set of
  7. # locations which depend on the deployment platform.
  8. # You can copy this option file to one of those
  9. # locations. For information about these locations, do:
  10. # 'my_print_defaults --help' and see what is printed under
  11. # Default options are read from the following files in the given order:
  12. # More information at: http://dev.mysql.com/doc/mysql/en/option-files.html
  13. #
  14. # In this file, you can use all long options that a program supports.
  15. # If you want to know which options a program supports, run the program
  16. # with the "--help" option.
  17.  
  18. # The following options will be passed to all MariaDB clients
  19.  
  20. ###############################
  21.  
  22. # Installation steps:
  23. # 1: mysqld --install MariaDB --defaults-file="D:\mariadb-10.2.11-winx64\my.ini"
  24. # 2: MySQL: mysqld --initialize
  25. # MariaDB: mysql_install_db.exe --datadir="D:\mariadb-10.2.11-winx64\mydb"
  26. # 3: net start MariaDB
  27. # 4: net stop MariaDB
  28.  
  29. # Update localhost root password:
  30. # 1: select user,host,authentication_string,password_expired from mysql.user;
  31. # 2: update mysql.user set authentication_string=password('qwe123') where user='root' and host='localhost';
  32. # 3: alter user 'root'@'localhost' identified by 'qwe123';
  33. # 4: FLUSH PRIVILEGES;
  34.  
  35. # Change the password to qwe123
  36. # 1: mysqladmin -u root -p password qwe123
  37.  
  38. # Setting up root remote access
  39. # 1: mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'qwe123' WITH GRANT OPTION;
  40. # 2: mysql> FLUSH PRIVILEGES;
  41.  
  42. # Create new database and user
  43. # 1: create database weblm character set utf8;
  44. # 2: grant all privileges on weblm.* to 'weblm'@'localhost' identified by 'weblm';
  45. # 3: flush privileges;
  46.  
  47. ###############################
  48.  
  49. [client]
  50. #password = your_password
  51. port = 3306
  52. socket = "D:\mariadb-10.2.11-winx64/mydb/mysql.sock"
  53.  
  54. default-character-set = utf8
  55.  
  56. # Here follows entries for some specific programs
  57.  
  58. # The MariaDB server
  59. [mysqld]
  60. port = 3306
  61.  
  62. basedir = "D:\mariadb-10.2.11-winx64"
  63. datadir = "D:\mariadb-10.2.11-winx64/mydb/"
  64. tmpdir = "D:\mariadb-10.2.11-winx64/mydb/"
  65. socket = "D:\mariadb-10.2.11-winx64/mydb/mysql.sock"
  66. log-error = "D:\mariadb-10.2.11-winx64/mydb/mysql_error.log"
  67.  
  68. init_connect = 'SET collation_connection = utf8_unicode_ci'
  69. init_connect = 'SET NAMES utf8'
  70. character-set-server = utf8
  71. collation-server = utf8_unicode_ci
  72. skip-character-set-client-handshake
  73.  
  74. skip-external-locking
  75. key_buffer_size = 256M
  76. max_allowed_packet = 1M
  77. table_open_cache = 256
  78. sort_buffer_size = 1M
  79. read_buffer_size = 1M
  80. read_rnd_buffer_size = 4M
  81. myisam_sort_buffer_size = 64M
  82. thread_cache_size = 8
  83. query_cache_size = 16M
  84.  
  85. # Try number of CPU's*2 for thread_concurrency
  86. #thread_concurrency = 8
  87.  
  88. # Point the following paths to different dedicated disks
  89. #tmpdir = /tmp/
  90.  
  91. # Don't listen on a TCP/IP port at all. This can be a security enhancement,
  92. # if all processes that need to connect to mysqld run on the same host.
  93. # All interaction with mysqld must be made via Unix sockets or named pipes.
  94. # Note that using this option without enabling named pipes on Windows
  95. # (via the "enable-named-pipe" option) will render mysqld useless!
  96. #
  97. #skip-networking
  98.  
  99. # Replication Master Server (default)
  100. # binary logging is required for replication
  101. log-bin = mysql-bin
  102.  
  103. # binary logging format - mixed recommended
  104. binlog_format = mixed
  105.  
  106. # required unique id between 1 and 2^32 - 1
  107. # defaults to 1 if master-host is not set
  108. # but will not function as a master if omitted
  109. server-id = 1
  110.  
  111. # Replication Slave (comment out master section to use this)
  112. #
  113. # To configure this host as a replication slave, you can choose between
  114. # two methods :
  115. #
  116. # 1) Use the CHANGE MASTER TO command (fully described in our manual) -
  117. # the syntax is:
  118. #
  119. # CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
  120. # MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
  121. #
  122. # where you replace <host>, <user>, <password> by quoted strings and
  123. # <port> by the master's port number (3306 by default).
  124. #
  125. # Example:
  126. #
  127. # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
  128. # MASTER_USER='joe', MASTER_PASSWORD='secret';
  129. #
  130. # OR
  131. #
  132. # 2) Set the variables below. However, in case you choose this method, then
  133. # start replication for the first time (even unsuccessfully, for example
  134. # if you mistyped the password in master-password and the slave fails to
  135. # connect), the slave will create a master.info file, and any later
  136. # change in this file to the variables' values below will be ignored and
  137. # overridden by the content of the master.info file, unless you shutdown
  138. # the slave server, delete master.info and restart the slaver server.
  139. # For that reason, you may want to leave the lines below untouched
  140. # (commented) and instead use CHANGE MASTER TO (see above)
  141. #
  142. # required unique id between 2 and 2^32 - 1
  143. # (and different from the master)
  144. # defaults to 2 if master-host is set
  145. # but will not function as a slave if omitted
  146. #server-id = 2
  147. #
  148. # The replication master for this slave - required
  149. #master-host = <hostname>
  150. #
  151. # The username the slave will use for authentication when connecting
  152. # to the master - required
  153. #master-user = <username>
  154. #
  155. # The password the slave will authenticate with when connecting to
  156. # the master - required
  157. #master-password = <password>
  158. #
  159. # The port the master is listening on.
  160. # optional - defaults to 3306
  161. #master-port = <port>
  162. #
  163. # binary logging - not required for slaves, but recommended
  164. #log-bin=mysql-bin
  165.  
  166. # Uncomment the following if you are using InnoDB tables
  167. #innodb_data_home_dir = C:\\mysql\\data\\
  168. #innodb_data_file_path = ibdata1:10M:autoextend
  169. #innodb_log_group_home_dir = C:\\mysql\\data\\
  170. # You can set .._buffer_pool_size up to 50 - 80 %
  171. # of RAM but beware of setting memory usage too high
  172. #innodb_buffer_pool_size = 256M
  173. #innodb_additional_mem_pool_size = 20M
  174. # Set .._log_file_size to 25 % of buffer pool size
  175. #innodb_log_file_size = 64M
  176. #innodb_log_buffer_size = 8M
  177. #innodb_flush_log_at_trx_commit = 1
  178. #innodb_lock_wait_timeout = 50
  179.  
  180. [mysqldump]
  181. quick
  182. max_allowed_packet = 16M
  183.  
  184. [mysql]
  185. no-auto-rehash
  186. # Remove the next comment character if you are not familiar with SQL
  187. #safe-updates
  188.  
  189. default-character-set = utf8
  190.  
  191. [myisamchk]
  192. key_buffer_size = 128M
  193. sort_buffer_size = 128M
  194. read_buffer = 2M
  195. write_buffer = 2M
  196.  
  197. [mysqlhotcopy]
  198. interactive-timeout
  199.  
  200. ###############################

安装后在/root目录下没有发现有.mysql_secret这个文件,所以没有没法按照官方文档上说的那样使用,这里记录下,

解决方式:

  1. 首先修改MySQL授权登录方式---(跳过授权验证方式启动MySQL):
    [root@test ~]# mysqld_safe --skip-grant-tables &
  2. [1] 3401
  3. [root@test ~]# 2016-05-19T12:47:56.564385Z mysqld_safe Logging to '/var/log/mysqld.log'.
  4. 2016-05-19T12:47:56.589376Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

  5. 检查MySQL启动情况
  6. [root@test ~]# ps -ef | grep mysql
  7. root 3401 2880 0 20:47 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables
  8. mysql 3548 3401 0 20:47 pts/1 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --skip-grant-tables --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock

  9. 这时登录MySQL不再需要验证
    [root@test ~]# mysql

成功登录MySQL后:

  1. 切换到mysql系统库:
  2. mysql> use mysql;
  3.  
  4. 修改root账户登录密码:
  5. mysql> update user set password=password('') where user='root';
  6. ERROR 1054 (42S22): Unknown column 'password' in 'field list'
  7. ---报错没有password这个数据字段列

  8. 描述user
  9. mysql> desc user;
  10. ...
  11. | authentication_string | text | YES | | NULL | |
  12. | password_expired | enum('N','Y') | NO | | N | |
  13. | password_last_changed | timestamp | YES | | NULL | |
  14. | password_lifetime | smallint(5) unsigned | YES | | NULL | |
  15. | account_locked | enum('N','Y') | NO | | N | |
  16. +------------------------+-----------------------------------+------+-----+-----------------------+-------+
  17. ---没发现password列,但是找到这5个跟密码相关的数据字段

  18. 查询一下相关的密码信息:
  19. mysql> select user,host,authentication_string,password_expired from user;
  20. +-----------+-----------+-------------------------------------------+------------------+
  21. | user | host | authentication_string | password_expired |
  22. +-----------+-----------+-------------------------------------------+------------------+
  23. | root | localhost | *9AA01F6E2A80A823ACB72CC07337E2911404B5B8 | Y |
  24. | mysql.sys | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | N |
  25. +-----------+-----------+-------------------------------------------+------------------+
  26. ---到这里不难发现root账户的密码已过期,还比5.6多出了一个mysql.sys用户

  27. 修改密码
  28. mysql> update user set authentication_string=password('123abc') where user='root';
  29. Query OK, 1 row affected (0.00 sec)
  30. Rows matched: 1 Changed: 1 Warnings: 0
  31.  
  32. mysql> flush privileges;
  33. Query OK, 0 rows affected (0.00 sec)
  34.  
  35. mysql> exit

密码修改成功,测试:

  1. 重启MySQL
  2. [root@test ~]# /etc/init.d/mysqld restart
  3.  
  4. 登录测试:
  5. [root@test ~]# mysql -p
  6. Enter password:
  7. Welcome to the MySQL monitor. Commands end with ; or \g.
  8. Your MySQL connection id is 3
  9. Server version: 5.7.12-enterprise-commercial-advanced
  10. ...
  11. mysql> show databases;
  12. ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
  13. ---报错,需要使用alter user 修改密码
  14. mysql> alter user root@'localhost' identified by 'oracle';
  15. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
  16. ---报错,密码不满足制定的密码负责度要求
  17. mysql> alter user 'root'@'localhost' identified by 'Abc!123D';
  18. Query OK, 0 rows affected (0.01 sec)
  19.  
  20. mysql> show databases;
  21. +--------------------+
  22. | Database |
  23. +--------------------+
  24. | information_schema |
  25. | mysql |
  26. | performance_schema |
  27. | sys |
  28. +--------------------+
  29. 4 rows in set (0.00 sec)

关于密码策略

  1. mysql> SHOW VARIABLES LIKE 'validate_password%';
  2. +--------------------------------------+--------+
  3. | Variable_name | Value |
  4. +--------------------------------------+--------+
  5. | validate_password_dictionary_file | |
  6. | validate_password_length | 8 |
  7. | validate_password_mixed_case_count | 1 |
  8. | validate_password_number_count | 1 |
  9. | validate_password_policy | MEDIUM |
  10. | validate_password_special_char_count | 1 |
  11. +--------------------------------------+--------+
  12. 6 rows in set (0.02 sec)
  13.  
  14. mysql> show plugins;
  15. +----------------------------+----------+--------------------+----------------------+-------------+
  16. | Name | Status | Type | Library | License |
  17. +----------------------------+----------+--------------------+----------------------+-------------+
  18. | binlog | ACTIVE | STORAGE ENGINE | NULL | PROPRIETARY |
  19.  
  20. ...
  21. | validate_password | ACTIVE | VALIDATE PASSWORD | validate_password.so | PROPRIETARY |
  22. +----------------------------+----------+--------------------+----------------------+-------------+
  23. ---可以通过在配置文件[mysqld]标签中添加 validate_passwor=off ,来关闭密码策略
  24. 如下:
  25. ...
  26. | validate_password | DISABLED | VALIDATE PASSWORD | validate_password.so | PROPRIETARY |
  27. +----------------------------+----------+--------------------+----------------------+-------------+

总结

1) 安装好mysql后,第一次启动时,root管理密码会在/root/.mysql_secret中随机生成

2) 至5.7后,MySQL的 mysql.user 表中的密码字段由之前的 password 改为 authentication_string

3) 使用--skip-grant-tables 参数启动,跳过MySQL的授权验证,--skip-networking参数,跳过远程登录

4) 修改MySQL密码方式:

法1:update user set authentication_string=password('123abc') where user='root';

法2:set password=password('newpassword');

法3:alter user root@'localhost' identified by 'oracle';

法4:在shell下使用MySQL工具:mysqladmin -uroot -poldpassword pasword "newpassword"

5) 关于MySQL密码策略:

决定是否使用该插件(及强制/永久强制使用)
--validate-password=ON/OFF/FORCE/FORCE_PLUS_PERMANENT
 
validate_password_dictionary_file           > 插件用于验证密码强度的字典文件路径。
validate_password_length                        > 密码最小长度。
validate_password_mixed_case_count     > 密码至少要包含的小写字母个数和大写字母个数。
validate_password_number_count    > 密码至少要包含的数字个数。
validate_password_policy                         > 密码强度检查等级,0/LOW、1/MEDIUM、2/STRONG
validate_password_special_char_count    > 密码至少要包含的特殊字符数。
 
其中关于validate_password_policy-密码强度检查等级:
0/LOW    > 只检查长度
1/MEDIUM      > 检查长度、数字、大小写、特殊字符
2/STRONG      > 检查长度、数字、大小写、特殊字符字典文件

后记

经过一段时间后,发现mysql初始密码原来被记录到了日志文件中

  1. 查找日志位置
    [root@test /var/lib/mysql]# ps -ef | grep mysql
  2. root 5604 1 0 22:40 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
  3. mysql 5802 5604 5 22:40 pts/1 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
  4. root 5837 2880 0 22:40 pts/1 00:00:00 grep --color mysql

  5. 藏在日志文件中的临时密码
  6. [root@test /var/lib/mysql]# grep "A temporary password" /var/log/mysqld.log
  7. 2016-05-17T16:46:53.059632Z 1 [Note] A temporary password is generated for root@localhost: +wGVA#to(4tu

MySQL5.7初始配置的更多相关文章

  1. win7 64bit下最新Apahe2.4.18+php7.0.2+MySQL5.7.10配置

    原文:win7 64bit下最新Apahe2.4.18+php7.0.2+MySQL5.7.10配置 一.说明 以前配置apache+php+mysql都是参考网上的,一般都没有什么问题.最近公司有个 ...

  2. Centos6.5 安装MYSQL 5.5 -5.6.-5.7 一键yum快速安装 ,初始配置

    Centos6.5 安装MYSQL 5.5 ---5.6---5.7 一键yum快速安装 ,初始配置 第一步:安装mysql-5.5---- 5.6 ---- 5.7的yum源 [root@sv03 ...

  3. appach2.4 + php7 +mysql5.7.14 配置

    步骤1.首先打开Apache2.2\conf里面的httpd.conf文件.在里面找到: ServerRoot ,改成Appache所在目录  步骤二 在LoadModule 后面添加支持php7的扩 ...

  4. Git 笔记二-Git安装与初始配置

    git 笔记二-Git安装与初始配置 Git的安装 由于我日常生活和工作基本上都是在Windows上,因此此处只说windows上的安装.Windows上的安装和其他程序一样,只需要到http://g ...

  5. win8安装mysql5.5最后配置没有反应

    win8安装mysql5.5最后配置没有反应 win8下安装mysql5.5一路顺利,可是到最后一步配置mysql服务及登录password后.注冊服务并启动服务界面一直没有不论什么反应: 本来以为是 ...

  6. IDEA 初始配置教程

    IDEA 初始配置教程 如果你是第一次使用 IDEA,或者对 IDEA 常用配置仍然不熟悉,那么本文就特别适合你. 本文只是根据我自己的使用经验来进行配置,不一定适合所有的情况,但是对你肯定会有帮助. ...

  7. Git初始配置和基本使用

    初次运行Git前的配置 本文是在安裝完git以后首先应做到一些配置,安装教程可以参考廖雪峰git教程 用户信息 当安装完 Git 应该做的第一件事就是设置你的用户名称与邮件地址. 这样做很重要,因为每 ...

  8. paloalto防火墙执行初始配置

    1.默认情况下,防火墙的 IP 地址为 192.168.1.1,用户名/密码为 admin/admin. 为了安全起见,在继续执行其他防火墙配置任务之前,必须更改这些设置.必须从 MGT 接口(即使计 ...

  9. Testlink1.9.17使用方法( 第三章 初始配置[配置用户、产品] )

    第三章 初始配置(配置用户.产品) 一. 设置用户 QQ交流群:585499566 在TestLink系统中,每个用户都可以维护自己的私有信息.admin可以创建用户,但不能看到其它用户的密码.在用户 ...

随机推荐

  1. MySQL入门篇(五)之高可用架构MHA

    一.MHA原理 1.简介: MHA(Master High Availability)目前在MySQL高可用方面是一个相对成熟的解决方案,它由日本DeNA公司youshimaton(现就职于Faceb ...

  2. SaltStack入门篇(七)之架构部署实战

    模块:https://docs.saltstack.com/en/2016.11/ref/states/all/index.html 实战架构图: 实验环境设置: 主机名 IP地址 角色 linux- ...

  3. DSP28335做FFT傅里叶变换

    1. 看了一下例程,居然没有FFT的例程,难道这个DSP28335不能做FFT吗?对了C2000系列是有C2000 ware这个库的.方便很多,不过目前不确定在C5000上运行的FFT能直接迁移到DS ...

  4. LAUNCHXL-28379D入门学习-第一篇

    1. 首先安装controlSUITE或者C2000ware软件,TI官网下载,安装后包括C2000的函数库和例程之类的,还可以和CCS搭配使用.controlSUITE安装完之后大约4个G,所以我安 ...

  5. JQuery事件机制

    1 事件操作 1.1 页面载入事件 $(document).ready(function(){ // 在这里写你的代码... }); 或者 $(function($) { // 你可以在这里继续使用$ ...

  6. Maven学习(十一)-----使用Maven创建Web应用程序项目

    使用Maven创建Web应用程序项目 用到的技术/工具: Maven 3.3.3 Eclipse 4.3 JDK 8 Spring 4.1.1.RELEASED Tomcat 7 Logback 1. ...

  7. vs2010(vs2012)好用的扩展插件介绍

    一直以来只使用番茄vs助手(https://www.wholetomato.com/downloads/default.asp)辅助写代码,也都忘了是谁介绍的,不过确实好用. 相比原始的vs,它提供了 ...

  8. springmvc传参---LocalDateTime、Date等时间类型转换

    此处定义的dateConvert用来转换Date类型,如果是LocalDate.LocalDateTime类型,则将Date类型换成相应的类型即可,注意java8的日期类型需要用Formatter格式 ...

  9. 人脸检测及识别python实现系列(4)——卷积神经网络(CNN)入门

    人脸检测及识别python实现系列(4)——卷积神经网络(CNN)入门 上篇博文我们准备好了2000张训练数据,接下来的几节我们将详细讲述如何利用这些数据训练我们的识别模型.前面说过,原博文给出的训练 ...

  10. 人脸检测及识别python实现系列(1)——配置、获取实时视频流

    人脸检测及识别python实现系列(1)——配置.获取实时视频流 1. 前言 今天用多半天的时间把QQ空间里的几篇年前的旧文搬到了这里,算是完成了博客搬家.QQ空间里还剩下一些记录自己数学学习路线的学 ...