大佬们求解决啊,centos命令行解决mariadb
(1) 配置mariadb服务,修改mariadb配置文件,实现以下需求:l 服务仅监听在192.168.1XX.33的IP地址上l 关闭数据库域名解析功能l innodb开启独立表空间模式。l 数据库存储位置为/data/databasel wordpress数据库授权wordpress用户能够通过192.168.1XX.%主机执行所有操作。重启就会报错@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.# 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 agoProcess: 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: Corporation Ab. You can contact us about this at sales@mar...com.Dec 05 23:28:43 bogon mariadb-prepare-db-dir: Alternatively consider joining our community based develop...ort:Dec 05 23:28:43 bogon mariadb-prepare-db-dir: http://mariadb.com/kb/en/contributing-to-the-mariadb-project/Dec 05 23:28:43 bogon mysqld_safe: 191205 23:28:43 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.Dec 05 23:28:43 bogon mysqld_safe: 191205 23:28:43 mysqld_safe Starting mysqld daemon with databases fr...abaseDec 05 23:28:43 bogon mysqld_safe: 191205 23:28:43 mysqld_safe mysqld from pid file /var/run/mariadb/ma...endedDec 05 23:28:44 bogon systemd: mariadb.service: control process exited, code=exited status=1Dec 05 23:28:44 bogon systemd: Failed to start MariaDB database server.Dec 05 23:28:44 bogon systemd: Unit mariadb.service entered failed state.Dec 05 23:28:44 bogon systemd: mariadb.service failed.Hint: Some lines were ellipsized, use -l to show in full. 求解啊,实在不会了 (6)配置mariadb服务,修改mariadb配置文件,实现以下需求:
服务仅监听在192.168.1XX.33的IP地址上
关闭数据库域名解析功能
innodb开启独立表空间模式。
数据库存储位置为/data/database
wordpress数据库授权wordpress用户能够通过192.168.1XX.%主机执行所有操作。重启就会报错
# 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.
# 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: Corporation Ab. You can contact us about this at sales@mar...com.
Dec 05 23:28:43 bogon mariadb-prepare-db-dir: Alternatively consider joining our community based develop...ort:
Dec 05 23:28:43 bogon mariadb-prepare-db-dir: http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
Dec 05 23:28:43 bogon mysqld_safe: 191205 23:28:43 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Dec 05 23:28:43 bogon mysqld_safe: 191205 23:28:43 mysqld_safe Starting mysqld daemon with databases fr...abase
Dec 05 23:28:43 bogon mysqld_safe: 191205 23:28:43 mysqld_safe mysqld from pid file /var/run/mariadb/ma...ended
Dec 05 23:28:44 bogon systemd: mariadb.service: control process exited, code=exited status=1
Dec 05 23:28:44 bogon systemd: Failed to start MariaDB database server.
Dec 05 23:28:44 bogon systemd: Unit mariadb.service entered failed state.
Dec 05 23:28:44 bogon systemd: mariadb.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
不知道为什么有乱码,再发一下 /var/log/mariadb/mariadb.log 日志发上来 # 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 /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:42InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
191205 22:56:42InnoDB: 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:42InnoDB: 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:42InnoDB: 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 Plugin 'FEEDBACK' is disabled.
191205 22:56:43 Server socket created on IP: '0.0.0.0'.
191205 22:56:43 Event Scheduler: Loaded 0 events
191205 22:56:43 /usr/libexec/mysqld: ready for connections.
Version: '5.5.44-MariaDB'socket: '/var/lib/mysql/mysql.sock'port: 3306MariaDB Server
191205 23:28:41 /usr/libexec/mysqld: Normal shutdown
191205 23:28:41 Event Scheduler: Purging the queue. 0 events
191205 23:28:41InnoDB: Starting shutdown...
191205 23:28:42InnoDB: Shutdown completed; log sequence number 1597945
191205 23:28:42 /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 /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 11344 ...
191205 23:28:43 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:43InnoDB: 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
1912060:26:36 /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 11617 ...
1912060:26:36 Can't create test file /data/database/bogon.lower-test
1912060:26:36 InnoDB: The InnoDB memory heap is disabled
1912060:26:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
1912060:26:36 InnoDB: Compressed tables use zlib 1.2.7
1912060:26:36 InnoDB: Using Linux native AIO
1912060:26:36 InnoDB: Initializing buffer pool, size = 128.0M
1912060:26:36 InnoDB: Completed initialization of buffer pool
1912060:26:36InnoDB: 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
# smldhz 发表于 2019-12-6 13:01
/var/log/mariadb/mariadb.log 日志发上来
# 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 /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:42InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
191205 22:56:42InnoDB: 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:42InnoDB: 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:42InnoDB: 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 Plugin 'FEEDBACK' is disabled.
191205 22:56:43 Server socket created on IP: '0.0.0.0'.
191205 22:56:43 Event Scheduler: Loaded 0 events
191205 22:56:43 /usr/libexec/mysqld: ready for connections.
Version: '5.5.44-MariaDB'socket: '/var/lib/mysql/mysql.sock'port: 3306MariaDB Server
191205 23:28:41 /usr/libexec/mysqld: Normal shutdown
191205 23:28:41 Event Scheduler: Purging the queue. 0 events
191205 23:28:41InnoDB: Starting shutdown...
191205 23:28:42InnoDB: Shutdown completed; log sequence number 1597945
191205 23:28:42 /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 /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 11344 ...
191205 23:28:43 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:43InnoDB: 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
1912060:26:36 /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 11617 ...
1912060:26:36 Can't create test file /data/database/bogon.lower-test
1912060:26:36 InnoDB: The InnoDB memory heap is disabled
1912060:26:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
1912060:26:36 InnoDB: Compressed tables use zlib 1.2.7
1912060:26:36 InnoDB: Using Linux native AIO
1912060:26:36 InnoDB: Initializing buffer pool, size = 128.0M
1912060:26:36 InnoDB: Completed initialization of buffer pool
1912060:26:36InnoDB: 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
# 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没关
setenforce 0
把selinux关掉
smldhz 发表于 2019-12-6 13:47
检查下 /data/database/的所有者和读写权限是否正常 如果都正常的话看下是不是selinux没关
成功了,太感谢了
页:
[1]