1、原先安装mysql5.7数据库,导入我的项目里的带数据有报错信息
原因不明
2、只能建议用docker进行msyql5.7的安装
如下,可以修改成自己需要的信息
docker run -p 3306:3306 --name mastermysql -v /home/mydata/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=mastermysql -d mysql:5.7.21
导入数据库就常了
3、运行nbcio-boot后出现下面错误
后面有相关信息,实际上是表的大小写问题
可以去掉这个设置,用
lower_case_table_names=1
4、最好用下面的文件配置进行覆盖,因为这个docker跟一般的mysql配置不大一样
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# The MySQL Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
#log-error = /var/log/mysql/error.log
# By default we only accept connections from localhost
#bind-address = 127.0.0.1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
lower_case_table_names=1
取名mysqld.cnf拷贝到容器的/etc/mysql# cd mysql.conf.d/ 里,用docker cp方式
5、用navicat工具的命令列界面
用下面命令可以看数据库启动参数
6、这样就能解决数据库问题,项目正常启动了。