質問編集履歴
2
書式改善
title
CHANGED
File without changes
|
body
CHANGED
@@ -29,6 +29,8 @@
|
|
29
29
|
|
30
30
|
【行った手順】
|
31
31
|
➀mariadbをインストール、初期設定完了。system statusでは以下のように問題なく起動しています。
|
32
|
+
```ここに言語を入力
|
33
|
+
|
32
34
|
[root@dbsv ~]# systemctl status mariadb.service
|
33
35
|
● mariadb.service - MariaDB database server
|
34
36
|
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
|
@@ -49,8 +51,10 @@
|
|
49
51
|
10月 27 19:41:00 dbsv mariadb-prepare-db-dir[4372]: http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
|
50
52
|
10月 27 19:41:00 dbsv mysqld_safe[4447]: 201027 19:41:00 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
|
51
53
|
10月 27 19:41:00 dbsv mysqld_safe[4447]: 201027 19:41:00 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
|
52
|
-
10月 27 19:41:02 dbsv systemd[1]: Started MariaDB database server.
|
54
|
+
10月 27 19:41:02 dbsv systemd[1]: Started MariaDB database server.```ここに言語を入力
|
53
55
|
|
56
|
+
```
|
57
|
+
|
54
58
|
➁接続しようとしたところ、太字のエラーが出てしまいました。
|
55
59
|
このエラーで出ている/opt/mysqlは後の過程でデータディレクトリを/var/・・を/opt/・・に変更するので設定ファイルに以下のように変更を加えたのですが、削除しバックアップファイルを元に復元したので、設定ファイルに残っていないはずです。
|
56
60
|
cd /opt/mysqlで実行してもディレクトリはありません。となっていました。
|
@@ -70,8 +74,9 @@
|
|
70
74
|
[root@dbsv ~]#
|
71
75
|
|
72
76
|
|
77
|
+
|
78
|
+
```
|
73
79
|
<設定ファイルの中身>
|
74
|
-
```
|
75
80
|
[root@dbsv ~]# cat /etc/my.cnf
|
76
81
|
[mysqld]
|
77
82
|
datadir=/var/lib/mysql
|
@@ -109,9 +114,11 @@
|
|
109
114
|
default-character-set = utf8```
|
110
115
|
|
111
116
|
|
112
|
-
<バックアップファイル> cp -pで作成しました。
|
113
117
|
|
118
|
+
|
114
119
|
```
|
120
|
+
````ここに言語を入力
|
121
|
+
<バックアップファイル> cp -pで作成しました。
|
115
122
|
[root@dbsv ~]# cat /etc/my.cnf.org
|
116
123
|
[mysqld]
|
117
124
|
#datadir=/var/lib/mysql
|
1
説明捕捉
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
上の質問にあったように不要なファイルがないか確かめているのですが、もしかしたら削除前のファイルが何か残っているせいなのでしょうか?
|
5
5
|
何卒宜しくお願い致します。
|
6
6
|
|
7
|
-
|
7
|
+
【環境】
|
8
8
|
・OS:Linux7(64bit)
|
9
9
|
インストール済みパッケージ
|
10
10
|
・mariadb-server.x86_64
|
@@ -27,7 +27,7 @@
|
|
27
27
|
その後、再インストールし、初期設定を完了させた。
|
28
28
|
|
29
29
|
|
30
|
-
|
30
|
+
【行った手順】
|
31
31
|
➀mariadbをインストール、初期設定完了。system statusでは以下のように問題なく起動しています。
|
32
32
|
[root@dbsv ~]# systemctl status mariadb.service
|
33
33
|
● mariadb.service - MariaDB database server
|
@@ -55,13 +55,13 @@
|
|
55
55
|
このエラーで出ている/opt/mysqlは後の過程でデータディレクトリを/var/・・を/opt/・・に変更するので設定ファイルに以下のように変更を加えたのですが、削除しバックアップファイルを元に復元したので、設定ファイルに残っていないはずです。
|
56
56
|
cd /opt/mysqlで実行してもディレクトリはありません。となっていました。
|
57
57
|
|
58
|
-
|
58
|
+
#datadir=/var/lib/mysql
|
59
|
-
|
59
|
+
datadir=/opt/mysql
|
60
|
-
|
60
|
+
#socket=/var/lib/mysql/mysql.sock
|
61
|
-
|
61
|
+
socket=/opt/mysql/mysql.sock
|
62
62
|
[client]
|
63
63
|
default-character-set = utf8
|
64
|
-
|
64
|
+
socket=/opt/mysql/mysql.sock
|
65
65
|
|
66
66
|
<エラー表示>
|
67
67
|
[root@dbsv ~]# mysql -u root -p
|
@@ -71,25 +71,25 @@
|
|
71
71
|
|
72
72
|
|
73
73
|
<設定ファイルの中身>
|
74
|
+
```
|
74
75
|
[root@dbsv ~]# cat /etc/my.cnf
|
75
|
-
|
76
76
|
[mysqld]
|
77
77
|
datadir=/var/lib/mysql
|
78
78
|
socket=/var/lib/mysql/mysql.sock
|
79
|
-
|
79
|
+
# Disabling symbolic-links is recommended to prevent assorted security risks
|
80
80
|
symbolic-links=0
|
81
|
-
|
81
|
+
#Settings user and group are ignored when systemd is used.
|
82
|
-
|
82
|
+
#If you need to run mysqld under a different user or group,
|
83
|
-
|
83
|
+
#customize your systemd unit file for mariadb according to the
|
84
|
-
|
84
|
+
#instructions in http://fedoraproject.org/wiki/Systemd
|
85
85
|
|
86
86
|
[mysqld_safe]
|
87
87
|
log-error=/var/log/mariadb/mariadb.log
|
88
88
|
pid-file=/var/run/mariadb/mariadb.pid
|
89
89
|
|
90
|
-
|
90
|
+
#
|
91
|
-
|
91
|
+
#include all files from the config directory
|
92
|
-
|
92
|
+
#
|
93
93
|
!includedir /etc/my.cnf.d
|
94
94
|
|
95
95
|
[mysqld]
|
@@ -106,30 +106,32 @@
|
|
106
106
|
default-character-set = utf8
|
107
107
|
|
108
108
|
[mysql]
|
109
|
-
default-character-set = utf8
|
109
|
+
default-character-set = utf8```
|
110
110
|
|
111
|
+
|
111
112
|
<バックアップファイル> cp -pで作成しました。
|
113
|
+
|
114
|
+
```
|
112
115
|
[root@dbsv ~]# cat /etc/my.cnf.org
|
113
|
-
|
114
116
|
[mysqld]
|
115
|
-
|
117
|
+
#datadir=/var/lib/mysql
|
116
|
-
|
118
|
+
#socket=/var/lib/mysql/mysql.sock
|
117
|
-
|
119
|
+
#Disabling symbolic-links is recommended to prevent assorted security risks
|
118
120
|
symbolic-links=0
|
119
|
-
|
121
|
+
#Settings user and group are ignored when systemd is used.
|
120
|
-
|
122
|
+
#If you need to run mysqld under a different user or group,
|
121
|
-
|
123
|
+
# customize your systemd unit file for mariadb according to the
|
122
|
-
|
124
|
+
# instructions in http://fedoraproject.org/wiki/Systemd
|
123
125
|
|
124
126
|
[mysqld_safe]
|
125
127
|
log-error=/var/log/mariadb/mariadb.log
|
126
128
|
pid-file=/var/run/mariadb/mariadb.pid
|
127
129
|
|
128
|
-
#
|
129
|
-
# include all files from the config directory
|
130
|
-
#
|
131
|
-
!includedir /etc/my.cnf.d
|
132
130
|
|
131
|
+
#include all files from the config directory
|
132
|
+
|
133
|
+
#includedir /etc/my.cnf.d
|
134
|
+
|
133
135
|
[mysqld]
|
134
136
|
skip-character-set-client-handshake
|
135
137
|
character-set-server = utf8
|
@@ -145,4 +147,5 @@
|
|
145
147
|
|
146
148
|
[mysql]
|
147
149
|
default-character-set = utf8
|
148
|
-
[root@dbsv ~]#
|
150
|
+
[root@dbsv ~]#
|
151
|
+
```
|