Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
需要Openshift mysql帮助吗_Mysql_Openshift - Fatal编程技术网

需要Openshift mysql帮助吗

需要Openshift mysql帮助吗,mysql,openshift,Mysql,Openshift,我是Openshift开发的新手,我正在尝试创建一个mysql db pod。有人能给我推荐一些好的参考资料吗?这就是我所做的:(p.s使用oc cli) 登录到openshift online后在命令行上创建数据库: oc new-app -e MYSQL_USER=churchill -e MYSQL_PASSWORD=passme -e MYSQL_DATABASE=mydatabase openshift/mysql-56-centos7 现在已经创建了db,我在Openshift m

我是Openshift开发的新手,我正在尝试创建一个mysql db pod。有人能给我推荐一些好的参考资料吗?这就是我所做的:(p.s使用oc cli)

登录到openshift online后在命令行上创建数据库:

oc new-app -e MYSQL_USER=churchill -e MYSQL_PASSWORD=passme -e MYSQL_DATABASE=mydatabase openshift/mysql-56-centos7
现在已经创建了db,我在Openshift 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
2020-01-12 09:30:39 1 [Note] /opt/rh/rh-mysql56/root/usr/libexec/mysqld: ready for connections.
Version: '5.6.24'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)

这是我的问题,我觉得这里出了点问题,有人能直接帮忙或推荐一些材料吗?(关闭命令很可怕)

这似乎是图像的正常日志。只要你能通过mysql连接,你就没事了。尝试:

oc get pods
oc rsh <POD>
mysql -u <MYSQL_USER> -p<MYSQL_PASSWORD> -h <HOSTNAME> <MYSQL_DATABASE>
oc获取吊舱
oc rsh
mysql-u-p-h