吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1669|回复: 6
收起左侧

[求助] 大佬们求解决啊,centos命令行解决mariadb

[复制链接]
寻道之旅 发表于 2019-12-6 12:31

(1) 配置mariadb服务,修改mariadb配置文件,实现以下需求:l 服务仅监听在192.168.1XX.33IP地址上l 关闭数据库域名解析功能l innodb开启独立表空间模式。l 数据库存储位置为/data/databasel wordpress数据库授权wordpress用户能够通过192.168.1XX.%主机执行所有操作。重启就会报错  [root@bogon ~]# systemctl restart mariadbJob for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.[root@bogon ~]# systemctl status mariadb.servicea—? mariadb.service - MariaDB database server   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)   Active: failed (Result: exit-code) since Thu 2019-12-05 23:28:44 EST; 7s ago  Process: 11151 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)  Process: 11150 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)  Process: 11068 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) Main PID: 11150 (code=exited, status=0/SUCCESS)
Dec 05 23:28:43 bogon mariadb-prepare-db-dir[11068]: Corporation Ab. You can contact us about this at sales@mar...com.Dec 05 23:28:43 bogon mariadb-prepare-db-dir[11068]: Alternatively consider joining our community based develop...ort:Dec 05 23:28:43 bogon mariadb-prepare-db-dir[11068]: http://mariadb.com/kb/en/contributing-to-the-mariadb-project/Dec 05 23:28:43 bogon mysqld_safe[11150]: 191205 23:28:43 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.Dec 05 23:28:43 bogon mysqld_safe[11150]: 191205 23:28:43 mysqld_safe Starting mysqld daemon with databases fr...abaseDec 05 23:28:43 bogon mysqld_safe[11150]: 191205 23:28:43 mysqld_safe mysqld from pid file /var/run/mariadb/ma...endedDec 05 23:28:44 bogon systemd[1]: mariadb.service: control process exited, code=exited status=1Dec 05 23:28:44 bogon systemd[1]: Failed to start MariaDB database server.Dec 05 23:28:44 bogon systemd[1]: Unit mariadb.service entered failed state.Dec 05 23:28:44 bogon systemd[1]: mariadb.service failed.Hint: Some lines were ellipsized, use -l to show in full.    求解啊,实在不会了

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

 楼主| 寻道之旅 发表于 2019-12-6 12:34
(6)配置mariadb服务,修改mariadb配置文件,实现以下需求:
服务仅监听在192.168.1XX.33的IP地址上
关闭数据库域名解析功能
innodb开启独立表空间模式。
数据库存储位置为/data/database
wordpress数据库授权wordpress用户能够通过192.168.1XX.%主机执行所有操作。重启就会报错
   [root@bogon ~]# systemctl restart mariadb
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
[root@bogon ~]# systemctl status mariadb.service
a—? mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2019-12-05 23:28:44 EST; 7s ago
  Process: 11151 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
  Process: 11150 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
  Process: 11068 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 11150 (code=exited, status=0/SUCCESS)

Dec 05 23:28:43 bogon mariadb-prepare-db-dir[11068]: Corporation Ab. You can contact us about this at sales@mar...com.
Dec 05 23:28:43 bogon mariadb-prepare-db-dir[11068]: Alternatively consider joining our community based develop...ort:
Dec 05 23:28:43 bogon mariadb-prepare-db-dir[11068]: http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
Dec 05 23:28:43 bogon mysqld_safe[11150]: 191205 23:28:43 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Dec 05 23:28:43 bogon mysqld_safe[11150]: 191205 23:28:43 mysqld_safe Starting mysqld daemon with databases fr...abase
Dec 05 23:28:43 bogon mysqld_safe[11150]: 191205 23:28:43 mysqld_safe mysqld from pid file /var/run/mariadb/ma...ended
Dec 05 23:28:44 bogon systemd[1]: mariadb.service: control process exited, code=exited status=1
Dec 05 23:28:44 bogon systemd[1]: Failed to start MariaDB database server.
Dec 05 23:28:44 bogon systemd[1]: Unit mariadb.service entered failed state.
Dec 05 23:28:44 bogon systemd[1]: mariadb.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
   不知道为什么有乱码,再发一下
smldhz 发表于 2019-12-6 13:01
 楼主| 寻道之旅 发表于 2019-12-6 13:28
[root@bogon ~]# cat /var/log/mariadb/mariadb.log
191205 22:56:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
191205 22:56:42 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 10997 ...
191205 22:56:42 InnoDB: The InnoDB memory heap is disabled
191205 22:56:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
191205 22:56:42 InnoDB: Compressed tables use zlib 1.2.7
191205 22:56:42 InnoDB: Using Linux native AIO
191205 22:56:42 InnoDB: Initializing buffer pool, size = 128.0M
191205 22:56:42 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
191205 22:56:42  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
191205 22:56:42  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
191205 22:56:42  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
191205 22:56:42  InnoDB: Waiting for the background threads to start
191205 22:56:43 Percona XtraDB (http://www.percona.com) 5.5.43-MariaDB-37.2 started; log sequence number 0
191205 22:56:43 [Note] Plugin 'FEEDBACK' is disabled.
191205 22:56:43 [Note] Server socket created on IP: '0.0.0.0'.
191205 22:56:43 [Note] Event Scheduler: Loaded 0 events
191205 22:56:43 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.44-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
191205 23:28:41 [Note] /usr/libexec/mysqld: Normal shutdown

191205 23:28:41 [Note] Event Scheduler: Purging the queue. 0 events
191205 23:28:41  InnoDB: Starting shutdown...
191205 23:28:42  InnoDB: Shutdown completed; log sequence number 1597945
191205 23:28:42 [Note] /usr/libexec/mysqld: Shutdown complete

191205 23:28:42 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
191205 23:28:43 mysqld_safe Starting mysqld daemon with databases from /data/database
191205 23:28:43 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 11344 ...
191205 23:28:43 [Warning] Can't create test file /data/database/bogon.lower-test
191205 23:28:43 InnoDB: The InnoDB memory heap is disabled
191205 23:28:43 InnoDB: Mutexes and rw_locks use GCC atomic builtins
191205 23:28:43 InnoDB: Compressed tables use zlib 1.2.7
191205 23:28:43 InnoDB: Using Linux native AIO
191205 23:28:43 InnoDB: Initializing buffer pool, size = 128.0M
191205 23:28:43 InnoDB: Completed initialization of buffer pool
191205 23:28:43  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
191205 23:28:43 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
191206 00:26:36 mysqld_safe Starting mysqld daemon with databases from /data/database
191206  0:26:36 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 11617 ...
191206  0:26:36 [Warning] Can't create test file /data/database/bogon.lower-test
191206  0:26:36 InnoDB: The InnoDB memory heap is disabled
191206  0:26:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
191206  0:26:36 InnoDB: Compressed tables use zlib 1.2.7
191206  0:26:36 InnoDB: Using Linux native AIO
191206  0:26:36 InnoDB: Initializing buffer pool, size = 128.0M
191206  0:26:36 InnoDB: Completed initialization of buffer pool
191206  0:26:36  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
191206 00:26:36 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
[root@bogon ~]#
 楼主| 寻道之旅 发表于 2019-12-6 13:30
smldhz 发表于 2019-12-6 13:01
/var/log/mariadb/mariadb.log 日志发上来

[root@bogon ~]# cat /var/log/mariadb/mariadb.log
191205 22:56:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
191205 22:56:42 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 10997 ...
191205 22:56:42 InnoDB: The InnoDB memory heap is disabled
191205 22:56:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
191205 22:56:42 InnoDB: Compressed tables use zlib 1.2.7
191205 22:56:42 InnoDB: Using Linux native AIO
191205 22:56:42 InnoDB: Initializing buffer pool, size = 128.0M
191205 22:56:42 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
191205 22:56:42  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
191205 22:56:42  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
191205 22:56:42  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
191205 22:56:42  InnoDB: Waiting for the background threads to start
191205 22:56:43 Percona XtraDB (http://www.percona.com) 5.5.43-MariaDB-37.2 started; log sequence number 0
191205 22:56:43 [Note] Plugin 'FEEDBACK' is disabled.
191205 22:56:43 [Note] Server socket created on IP: '0.0.0.0'.
191205 22:56:43 [Note] Event Scheduler: Loaded 0 events
191205 22:56:43 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.44-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
191205 23:28:41 [Note] /usr/libexec/mysqld: Normal shutdown

191205 23:28:41 [Note] Event Scheduler: Purging the queue. 0 events
191205 23:28:41  InnoDB: Starting shutdown...
191205 23:28:42  InnoDB: Shutdown completed; log sequence number 1597945
191205 23:28:42 [Note] /usr/libexec/mysqld: Shutdown complete

191205 23:28:42 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
191205 23:28:43 mysqld_safe Starting mysqld daemon with databases from /data/database
191205 23:28:43 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 11344 ...
191205 23:28:43 [Warning] Can't create test file /data/database/bogon.lower-test
191205 23:28:43 InnoDB: The InnoDB memory heap is disabled
191205 23:28:43 InnoDB: Mutexes and rw_locks use GCC atomic builtins
191205 23:28:43 InnoDB: Compressed tables use zlib 1.2.7
191205 23:28:43 InnoDB: Using Linux native AIO
191205 23:28:43 InnoDB: Initializing buffer pool, size = 128.0M
191205 23:28:43 InnoDB: Completed initialization of buffer pool
191205 23:28:43  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
191205 23:28:43 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
191206 00:26:36 mysqld_safe Starting mysqld daemon with databases from /data/database
191206  0:26:36 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 11617 ...
191206  0:26:36 [Warning] Can't create test file /data/database/bogon.lower-test
191206  0:26:36 InnoDB: The InnoDB memory heap is disabled
191206  0:26:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
191206  0:26:36 InnoDB: Compressed tables use zlib 1.2.7
191206  0:26:36 InnoDB: Using Linux native AIO
191206  0:26:36 InnoDB: Initializing buffer pool, size = 128.0M
191206  0:26:36 InnoDB: Completed initialization of buffer pool
191206  0:26:36  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
191206 00:26:36 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
[root@bogon ~]#
smldhz 发表于 2019-12-6 13:47
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.

检查下 /data/database/的所有者和读写权限是否正常 如果都正常的话看下是不是selinux没关
[Shell] 纯文本查看 复制代码
setenforce 0 

把selinux关掉

免费评分

参与人数 1吾爱币 +1 热心值 +1 收起 理由
寻道之旅 + 1 + 1 谢谢@Thanks!

查看全部评分

 楼主| 寻道之旅 发表于 2019-12-6 13:50
smldhz 发表于 2019-12-6 13:47
检查下 /data/database/的所有者和读写权限是否正常 如果都正常的话看下是不是selinux没关
[mw_shl_code ...

成功了,太感谢了
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止回复与主题无关非技术内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-9 04:36

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表