我的NodeJS+;Express+;MySQL应用程序未在Openshift上运行

我的NodeJS+;Express+;MySQL应用程序未在Openshift上运行,mysql,node.js,openshift,Mysql,Node.js,Openshift,My node js应用程序和mysql应用程序已成功部署,但尚未启动。当我查看日志文件时,我总是遇到这个错误: Running mysql_install_db ... 2020-01-12 09:30:31 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation f

My node js应用程序和mysql应用程序已成功部署,但尚未启动。当我查看日志文件时,我总是遇到这个错误:

Running mysql_install_db ...
2020-01-12 09:30:31 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-01-12 09:30:31 0 [Note] /opt/rh/rh-mysql56/root/usr/libexec/mysqld (mysqld 5.6.24) starting as process 13 ...


2020-01-12 09:30:34 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-01-12 09:30:34 0 [Note] /opt/rh/rh-mysql56/root/usr/libexec/mysqld (mysqld 5.6.24) starting as process 35 ...




PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  /opt/rh/rh-mysql56/root/usr/bin/mysqladmin -u root password 'new-password'
  /opt/rh/rh-mysql56/root/usr/bin/mysqladmin -u root -h mysql-56-centos7-2-vhjzz password 'new-password'

Alternatively you can run:

  /opt/rh/rh-mysql56/root/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

Note: new default config file not created.
Please make sure your config file is current

WARNING: Default config file /etc/opt/rh/rh-mysql56/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server

Starting local mysqld server ...
Waiting for MySQL to start ...
2020-01-12 09:30:36 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-01-12 09:30:36 0 [Note] /opt/rh/rh-mysql56/root/usr/libexec/mysqld (mysqld 5.6.24) starting as process 58 ...
2020-01-12 09:30:36 58 [Warning] One can only use the --user switch if running as root

2020-01-12 09:30:36 58 [Note] Plugin 'FEDERATED' is disabled.
2020-01-12 09:30:36 58 [Note] InnoDB: Using atomics to ref count buffer pool pages
2020-01-12 09:30:36 58 [Note] InnoDB: The InnoDB memory heap is disabled
2020-01-12 09:30:36 58 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-01-12 09:30:36 58 [Note] InnoDB: Memory barrier is not used
2020-01-12 09:30:36 58 [Note] InnoDB: Compressed tables use zlib 1.2.7
2020-01-12 09:30:36 58 [Note] InnoDB: Using Linux native AIO
2020-01-12 09:30:36 58 [Note] InnoDB: Using CPU crc32 instructions
2020-01-12 09:30:36 58 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2020-01-12 09:30:36 58 [Note] InnoDB: Completed initialization of buffer pool
2020-01-12 09:30:36 58 [Note] InnoDB: Highest supported file format is Barracuda.
2020-01-12 09:30:36 58 [Note] InnoDB: 128 rollback segment(s) are active.
2020-01-12 09:30:36 58 [Note] InnoDB: Waiting for purge to start
2020-01-12 09:30:36 58 [Note] InnoDB: 5.6.24 started; log sequence number 1625987
2020-01-12 09:30:36 58 [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: 3040e191-351e-11ea-8290-0a580a82084d.
2020-01-12 09:30:36 58 [Note] RSA private key file not found: /var/lib/mysql/data//private_key.pem. Some authentication plugins will not work.
2020-01-12 09:30:36 58 [Note] RSA public key file not found: /var/lib/mysql/data//public_key.pem. Some authentication plugins will not work.
2020-01-12 09:30:36 58 [Warning] 'user' entry 'root@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:36 58 [Warning] 'user' entry '@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:36 58 [Warning] 'proxies_priv' entry '@ root@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:36 58 [Note] Event Scheduler: Loaded 0 events
2020-01-12 09:30:36 58 [Note] /opt/rh/rh-mysql56/root/usr/libexec/mysqld: ready for connections.
Version: '5.6.24'  socket: '/tmp/mysql.sock'  port: 0  MySQL Community Server (GPL)
2020-01-12 09:30:36 58 [Warning] 'user' entry 'root@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:36 58 [Warning] 'user' entry '@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:36 58 [Warning] 'proxies_priv' entry '@ root@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:36 58 [Warning] 'user' entry 'root@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:36 58 [Warning] 'user' entry '@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:36 58 [Warning] 'proxies_priv' entry '@ root@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:36 58 [Note] /opt/rh/rh-mysql56/root/usr/libexec/mysqld: Normal shutdown

2020-01-12 09:30:36 58 [Note] Giving 0 client threads a chance to die gracefully
2020-01-12 09:30:36 58 [Note] Event Scheduler: Purging the queue. 0 events
2020-01-12 09:30:36 58 [Note] Shutting down slave threads
2020-01-12 09:30:36 58 [Note] Forcefully disconnecting 0 remaining clients
2020-01-12 09:30:36 58 [Note] Binlog end
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'partition'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'ARCHIVE'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'BLACKHOLE'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_METRICS'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_CMPMEM'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_CMP'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_LOCKS'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'INNODB_TRX'
2020-01-12 09:30:36 58 [Note] Shutting down plugin 'InnoDB'
2020-01-12 09:30:36 58 [Note] InnoDB: FTS optimize thread exiting.
2020-01-12 09:30:36 58 [Note] InnoDB: Starting shutdown...
2020-01-12 09:30:38 58 [Note] InnoDB: Shutdown completed; log sequence number 1625997
2020-01-12 09:30:38 58 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2020-01-12 09:30:38 58 [Note] Shutting down plugin 'MRG_MYISAM'
2020-01-12 09:30:38 58 [Note] Shutting down plugin 'MEMORY'
2020-01-12 09:30:38 58 [Note] Shutting down plugin 'CSV'
2020-01-12 09:30:38 58 [Note] Shutting down plugin 'MyISAM'
2020-01-12 09:30:38 58 [Note] Shutting down plugin 'sha256_password'
2020-01-12 09:30:38 58 [Note] Shutting down plugin 'mysql_old_password'
2020-01-12 09:30:38 58 [Note] Shutting down plugin 'mysql_native_password'
2020-01-12 09:30:38 58 [Note] Shutting down plugin 'binlog'
2020-01-12 09:30:38 58 [Note] /opt/rh/rh-mysql56/root/usr/libexec/mysqld: Shutdown complete

2020-01-12 09:30:39 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-01-12 09:30:39 0 [Note] /opt/rh/rh-mysql56/root/usr/libexec/mysqld (mysqld 5.6.24) starting as process 1 ...
2020-01-12 09:30:39 1 [Warning] One can only use the --user switch if running as root

2020-01-12 09:30:39 1 [Note] Plugin 'FEDERATED' is disabled.
2020-01-12 09:30:39 1 [Note] InnoDB: Using atomics to ref count buffer pool pages
2020-01-12 09:30:39 1 [Note] InnoDB: The InnoDB memory heap is disabled
2020-01-12 09:30:39 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-01-12 09:30:39 1 [Note] InnoDB: Memory barrier is not used
2020-01-12 09:30:39 1 [Note] InnoDB: Compressed tables use zlib 1.2.7
2020-01-12 09:30:39 1 [Note] InnoDB: Using Linux native AIO
2020-01-12 09:30:39 1 [Note] InnoDB: Using CPU crc32 instructions
2020-01-12 09:30:39 1 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2020-01-12 09:30:39 1 [Note] InnoDB: Completed initialization of buffer pool
2020-01-12 09:30:39 1 [Note] InnoDB: Highest supported file format is Barracuda.
2020-01-12 09:30:39 1 [Note] InnoDB: 128 rollback segment(s) are active.
2020-01-12 09:30:39 1 [Note] InnoDB: Waiting for purge to start
2020-01-12 09:30:39 1 [Note] InnoDB: 5.6.24 started; log sequence number 1625997
2020-01-12 09:30:39 1 [Note] RSA private key file not found: /var/lib/mysql/data//private_key.pem. Some authentication plugins will not work.
2020-01-12 09:30:39 1 [Note] RSA public key file not found: /var/lib/mysql/data//public_key.pem. Some authentication plugins will not work.
2020-01-12 09:30:39 1 [Note] Server hostname (bind-address): '*'; port: 3306
2020-01-12 09:30:39 1 [Note] IPv6 is available.
2020-01-12 09:30:39 1 [Note]   - '::' resolves to '::';
2020-01-12 09:30:39 1 [Note] Server socket created on IP: '::'.
2020-01-12 09:30:39 1 [Warning] 'user' entry 'root@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:39 1 [Warning] 'user' entry '@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:39 1 [Warning] 'proxies_priv' entry '@ root@mysql-56-centos7-2-vhjzz' ignored in --skip-name-resolve mode.
2020-01-12 09:30:39 1 [Note] Event Scheduler: Loaded 0 events
这是MySQL连接代码(密码是隐藏的,但我使用的是MySQL盒带以及用户提供的密码):


请帮我解决这个问题。

你是如何部署MySQL的?嗨,威尔,oc CLI命令>oc new app-e MySQL_USER=*****-e MySQL_PASSWORD=********-e MySQL_DATABASE=mobiletdb2 openshift/MySQL-56-centos7
var express = require('express');
var app     = express();
var morgan  = require('morgan');
const mysql = require('mysql');
var jwt = require('jsonwebtoken');
const upload = require('express-fileupload');
const resizer = require('node-image-resizer');
const path = require('path');
var bodyParser = require('body-parser')

// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))

// parse application/json
app.use(bodyParser.json())
Object.assign=require('object-assign')
app.use(function(req, res, next) {
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Multipart/form-data");
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Authorization");
  next();
});


app.engine('html', require('ejs').renderFile);
app.use(morgan('combined'))

/* mysql connection */
//Create db connection

const pool = mysql.createPool({
    host     : process.env.OPENSHIFT_MYSQL_DB_HOST,
  user     : process.env.OPENSHIFT_MYSQL_DB_USERNAME,
  password : process.env.OPENSHIFT_MYSQL_DB_PASSWORD,
  port     : process.env.OPENSHIFT_MYSQL_DB_PORT || 8080,
  database : "mobiletdb2"
});

//Connect
pool.query('select 1 + 1', (err, rows) => { /* */ });
app.post('/postthis', function(req, res) {
  console.log(req.body.telephone, req.body.passcode);
  res.json({"message":"got this response"});
})
app.post('/loginmobiletapp', (request, response) => {
  console.log(request.body.telephone, request.body.passcode);
  //let sql  = `SELECT * FROM mobilet_members WHERE telephone='${request.body.telephone}' AND pass_code='${request.body.passcode}'`;
  let sql  = `SELECT * FROM mobilet_members`;
    let query = pool.query(sql, (err, result)=>{
    if(err) throw err;
    if(result && result.length) {
      response.json({"message":"your stuff","data":result});
    }else {
      response.json({"message":"no notes"});
    }
  });
});