- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我转换了这个original项目到 docker-compose 项目 here并遵循他们的设置instructions 。我似乎无法连接浏览器。
SQL file包含数据库架构,如下所示:
CREATE DATABASE mgsv;
CREATE USER 'mgsv_user'@'localhost' IDENTIFIED BY 'mgsvpass';
GRANT SELECT, INSERT, CREATE, DROP ON mgsv.* TO 'mgsvuser'@'localhost';
use mgsv;
CREATE TABLE IF NOT EXISTS `userinfo` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`email` text NOT NULL,
`hash` text NOT NULL,
`synfilename` text NOT NULL,
`annfilename` text NOT NULL,
`url` text NOT NULL,
`session_id` text NOT NULL,
`annImage` int(5) NOT NULL,
`create_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
docker-compose.yml看起来像这样:
version: '3.1'
services:
db:
image: mysql
restart: always
environment:
- MYSQL_DATABASE=mgsv
- MYSQL_USER=mgsv_user
- MYSQL_PASSWORD=mgsvpass
- MYSQL_ROOT_PASSWORD=mysql123
volumes:
- ./mysql:/docker-entrypoint-initdb.d
www:
build: ./mGSV
restart: always
ports:
- 8080:8080
还有Dockerfile包含 PHP 和所有其他工具设置,如下所示。
FROM php:5-apache
RUN apt-get update && apt-get install -y --no-install-recommends \
openjdk-7-jdk \
maven \
git \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/qunfengdong/mGSV.git
# Move the folder 'mgsv' to DocumentRoot of Apache web server. By default, the DocumentRoot of Apache is /var/www/ (speak to the system administrator to know the exact DocumentRoot).
RUN cd /var/www/html/mGSV \
&& mkdir tmp \
&& chmod -R 777 tmp
RUN cd /var/www/html/mGSV && sed -i.bak "s|'gsv'|'mgsv_user'|" lib/settings.php \
&& sed -i.bak "s|$database_pass = ''|$database_pass = 'mgsvpass'|" lib/settings.php \
&& sed -i.bak "s|cas-qshare.cas.unt.edu|localhost|" lib/settings.php
RUN cp /var/www/html/mGSV/Arial.ttf /usr/share/fonts/truetype/
#Do not understand
#7. Cleanup scripts are provided to drop database synteny and annotation tables, remove entries from database table 'userinfo' and delete the folder containing image files which are older than 60 days. This task is accomplished by cron job to run the cleanup script every day. To create a cron job, use the command below:
# shell> crontab -e
#At the last line of crontab, copy and paste the line below, and provide the exact path to mgsv/lib/cleanup.php
# 30 04 * * * /var/www/mgsv/lib/cleanup.php
#The script cleanup.php will be executed at 4:30 AM every morning.
#8. mGSV uses the mail function from PHP to send email to users. Speak to your system administrator to provide required information in the PHP configuration file called 'php.ini'.
#9. When installation completes, you can now open Install/index.php (i.e., http://<YOUR_SERVER_DOMAIN_NAME>/mgsv/Install/), which verifies prerequisites, database setup, and installation. YOUR_SERVER_DOMAIN_NAME refers to the domain name of your server.
RUN cd /var/www/html/mGSV/ws \
&& tar -xzf mgsv-ws-server.tar.gz
RUN cd /var/www/html/mGSV/ws/mgsv-ws-server \
&& mvn package
RUN cp -f /var/www/html/mGSV/ws/mgsv-ws-server/target/ws-server-1.0RC1-jar-with-dependencies.jar /var/www/html/mGSV/ws/
RUN cd /var/www/html/mGSV/ws \
&& echo "mgsv_upload_url=http://localhost/mgsv" > config.properties \
&& echo "ws_publish_url=http\://localhost\:8081/MGSVService" >> config.properties \
&& java -jar ws-server-1.0RC1-jar-with-dependencies.jar &
#To stop the web service
#shell> ps aux | grep ws-server-1.0RC1-jar-with-dependencies.jar
#*Note the process id from the output*
#shell> kill -9 <process id>
这是我得到的输出:
Attaching to mgsvdocker_www_1, mgsvdocker_db_1
www_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.2. Set the 'ServerName' directive globally to suppress this message
www_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.2. Set the 'ServerName' directive globally to suppress this message
www_1 | [Mon Mar 19 22:12:02.742360 2018] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.10 (Debian) PHP/5.6.34 configured -- resuming normal operations
www_1 | [Mon Mar 19 22:12:02.744224 2018] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
db_1 | Initializing database
db_1 | 2018-03-19T22:12:02.855291Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
db_1 | 2018-03-19T22:12:03.251862Z 0 [Warning] InnoDB: New log files created, LSN=45790
db_1 | 2018-03-19T22:12:03.348644Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
db_1 | 2018-03-19T22:12:03.411853Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 8d99d2f8-2bc2-11e8-8ace-0242ac140003.
db_1 | 2018-03-19T22:12:03.414590Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
db_1 | 2018-03-19T22:12:03.415526Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
db_1 | 2018-03-19T22:12:05.555076Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:05.555603Z 1 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:05.556433Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:05.557353Z 1 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:05.558712Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:05.559068Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:05.559557Z 1 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:05.560388Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 | Database initialized
db_1 | Initializing certificates
db_1 | Generating a 2048 bit RSA private key
db_1 | ..........................................+++
db_1 | ...........................+++
db_1 | unable to write 'random state'
db_1 | writing new private key to 'ca-key.pem'
db_1 | -----
db_1 | Generating a 2048 bit RSA private key
db_1 | ....................................................................+++
db_1 | .................................................+++
db_1 | unable to write 'random state'
db_1 | writing new private key to 'server-key.pem'
db_1 | -----
db_1 | Generating a 2048 bit RSA private key
db_1 | ..........+++
db_1 | ...................................+++
db_1 | unable to write 'random state'
db_1 | writing new private key to 'client-key.pem'
db_1 | -----
db_1 | Certificates initialized
db_1 | MySQL init process in progress...
db_1 | 2018-03-19T22:12:09.627477Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
db_1 | 2018-03-19T22:12:09.628759Z 0 [Note] mysqld (mysqld 5.7.21) starting as process 87 ...
db_1 | 2018-03-19T22:12:09.633134Z 0 [Note] InnoDB: PUNCH HOLE support available
db_1 | 2018-03-19T22:12:09.634171Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1 | 2018-03-19T22:12:09.634378Z 0 [Note] InnoDB: Uses event mutexes
db_1 | 2018-03-19T22:12:09.634769Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
db_1 | 2018-03-19T22:12:09.635298Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
db_1 | 2018-03-19T22:12:09.635485Z 0 [Note] InnoDB: Using Linux native AIO
db_1 | 2018-03-19T22:12:09.636263Z 0 [Note] InnoDB: Number of pools: 1
db_1 | 2018-03-19T22:12:09.636914Z 0 [Note] InnoDB: Using CPU crc32 instructions
db_1 | 2018-03-19T22:12:09.639991Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
db_1 | 2018-03-19T22:12:09.650561Z 0 [Note] InnoDB: Completed initialization of buffer pool
db_1 | 2018-03-19T22:12:09.660208Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1 | 2018-03-19T22:12:09.673096Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
db_1 | 2018-03-19T22:12:09.697190Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1 | 2018-03-19T22:12:09.701919Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
db_1 | 2018-03-19T22:12:09.754718Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
db_1 | 2018-03-19T22:12:09.756113Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
db_1 | 2018-03-19T22:12:09.756140Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
db_1 | 2018-03-19T22:12:09.757786Z 0 [Note] InnoDB: Waiting for purge to start
db_1 | 2018-03-19T22:12:09.808245Z 0 [Note] InnoDB: 5.7.21 started; log sequence number 2551166
db_1 | 2018-03-19T22:12:09.809069Z 0 [Note] Plugin 'FEDERATED' is disabled.
db_1 | 2018-03-19T22:12:09.817123Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1 | 2018-03-19T22:12:09.822791Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180319 22:12:09
db_1 | 2018-03-19T22:12:09.834211Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
db_1 | 2018-03-19T22:12:09.834819Z 0 [Warning] CA certificate ca.pem is self signed.
db_1 | 2018-03-19T22:12:09.846515Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:09.846560Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:09.846579Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:09.846613Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:09.846622Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:09.846640Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:09.853203Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:09.853233Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:09.890674Z 0 [Note] Event Scheduler: Loaded 0 events
db_1 | 2018-03-19T22:12:09.890927Z 0 [Note] mysqld: ready for connections.
db_1 | Version: '5.7.21' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server (GPL)
db_1 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
db_1 | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
db_1 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
db_1 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
db_1 | 2018-03-19T22:12:13.111650Z 4 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.113784Z 4 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.115619Z 4 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.118409Z 4 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.118432Z 4 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.118458Z 4 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.118526Z 4 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.118543Z 4 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 | mysql: [Warning] Using a password on the command line interface can be insecure.
db_1 | mysql: [Warning] Using a password on the command line interface can be insecure.
db_1 | mysql: [Warning] Using a password on the command line interface can be insecure.
db_1 | mysql: [Warning] Using a password on the command line interface can be insecure.
db_1 | 2018-03-19T22:12:13.219113Z 8 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.222332Z 8 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.222366Z 8 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.222426Z 8 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.222437Z 8 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.222459Z 8 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.222753Z 8 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
db_1 | 2018-03-19T22:12:13.222768Z 8 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
db_1 |
db_1 | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/mgsv.sql
db_1 | mysql: [Warning] Using a password on the command line interface can be insecure.
db_1 | ERROR 1007 (HY000) at line 1: Can't create database 'mgsv'; database exists
我不太确定我是否在 docker-compose.yml 中犯了错误Dockerfile 内的文件或数据库配置.
有谁知道我错过了什么吗?
提前谢谢
最佳答案
您在 docker-compose.yml 文件中为 mysql 容器设置了环境变量“MYSQL_DATABASE=mgsv”。当mysql容器创建并启动时,它会自动创建数据库mgsv,并允许用户mgsv_user(由环境变量“MYSQL_USER=mgsv_user指定) >") 来访问它。详情可查看official documentation对于 mysql 镜像。
您应该做的是,从 SQL 文件中删除语句“CREATE DATABASE mgsv;”,或将该语句更改为“CREATE DATABASE IF NOT EXISTS mgsv;” >”。您可能还需要调整该 SQL 文件中的其他语句(例如,在本例中不需要创建用户)。
关于java - 第 1 行 : Can't create database 'mgsv' ; database exists 处出现错误 1007 (HY000),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49373422/
我的应用程序从一个有 5 个选项卡的选项卡栏 Controller 开始。一开始,第一个出现了它的名字,但其他四个没有名字,直到我点击它们。然后根据用户使用的语言显示名称。如何在选项卡栏出现之前设置选
我有嵌套数组 json 对象(第 1 层、第 2 层和第 3 层)。我的问题是数据表没有出现。任何相关的 CDN 均已导入。该表仅显示部分。我引用了很多网站,但都没有解决我的问题。 之前我使用标准表来
我正在尝试设置要显示的 Parse PFLoginViewController。这是我的一个 View Controller 的类。 import UIKit import Parse import
我遇到了这个问题,我绘制的对象没有出现在 GUI 中。我知道它正在被处理,因为数据被推送到日志文件。但是,图形没有出现。 这是我的一些代码: public static void main(Strin
我有一个树状图,其中包含出现这样的词...... TreeMap occurrence = new TreeMap (); 字符串 = 单词 整数 = 出现次数。 我如何获得最大出现次数 - 整数,
因此,我提示用户输入变量。如果变量小于 0 且大于 10。如果用户输入 10,我想要求用户再次输入数字。我问时间的时候输入4,它说你输入错误。但在第二次尝试时效果很好。例如:如果我输入 25,它会打印
我已经用 css overflow 属性做了一个例子。在这个例子中我遇到了一个溢出滚动的问题。滚动条出现了,但没有工作意味着每当将光标移动到滚动条时,在这个滚动条不活动的时间。我对此一无所知,所以请帮
我现在正在做一个元素。当您单击一个元素时,会出现以下信息,我想知道如何在您单击下一个元素而不重新单击同一元素时使其消失....例如,我的元素中有披萨,我想单击肉披萨看到浇头然后点击奶酪披萨看到浇头和肉
我有一个路由器模块,它将主题与正则表达式进行比较,并将出现的事件与一致的键掩码链接起来。 (它是一个简单的 url 路由过滤,如 symfony http://symfony.com/doc/curr
这个问题在这里已经有了答案: 9年前关闭。 Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, bo
我在底部有一个带有工具栏的 View ,我正在使用 NavigationLink 导航到该 View 。但是当 View 出现时,工具栏显示得有点太低了。大约半秒钟后,它突然跳到位。它只会在应用程序启
我试图在我的应用程序上为背景音乐添加一个 AVAudioPlayer,我正在主屏幕上启动播放器,尝试在应用程序打开时开始播放但出现意外行为... 它播放并立即不断创建新玩家并播放这些玩家,因此同时播放
这是获取一个数字,获取其阶乘并将其加倍,但是由于基本情况,如果您输入 0,它会给出 2 作为答案,因此为了绕过它,我使用了 if 语句,但收到错误输入“if”时解析错误。如果你们能提供帮助,我真的很感
暂停期间抛出异常 android.os.DeadObjectException 在 android.os.BinderProxy.transactNative( native 方法) 在 androi
我已经为猜词游戏编写了一些代码。它从用户输入中读取字符并在单词中搜索该字符;根据字符是否在单词中,程序返回并控制一些变量。 代码如下: import java.util.Random; import
我是自动化领域的新手。这是我的简单 TestNG 登录代码,当我以 TestNG 身份运行该代码时,它会出现 java.lang.NullPointerException,双击它会突出显示我导航到 U
我是c#程序员,我习惯了c#的封装语法和其他东西。但是现在,由于某些原因,我应该用java写一些东西,我现在正在练习java一天!我要创建一个为我自己创建一个虚拟项目,以便让自己更熟悉 Java 的
我正在使用 Intellij,我的源类是 main.com.coding,我的资源文件是 main.com.testing。我将 spring.xml 文件放入资源文件中。 我的测试类位于 test.
我想要我的tests folder separate到我的应用程序代码。我的项目结构是这样的 myproject/ myproject/ myproject.py moduleon
这个问题已经有答案了: What is a NullPointerException, and how do I fix it? (12 个回答) 已关闭 6 年前。 因此,我尝试比较 2 个值,一个
我是一名优秀的程序员,十分优秀!