(1) 配置mariadb服务,修改mariadb配置文件,实现以下需求:l 服务仅监听在192.168.1XX.33的IP地址上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. 求解啊,实在不会了
(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.
不知道为什么有乱码,再发一下
[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: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 ~]#
[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: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 ~]#
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.