データベースサーバー構築(MariaDB)
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[CentOS7]]
*データベースサーバー構築(MariaDB) [#jc1e28c8]
データベースサーバーは、サーバー上のデータベースをクライ...
ここでは、リレーショナル型データベースのデータベースサー...
*MariaDBインストール [#t6789e00]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# yum -y install mariadb-server &color...
*MariaDB設定 [#g476dd74]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /etc/my.cnf.d/server.cnf &color(l...
|[mysqld] &br; character-set-server = utf8 &color(lime){←...
*MariaDB起動 [#k90a8359]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# systemctl start mariadb &color(lime)...
|[root@localhost ~]# systemctl enable mariadb &color(lime...
*MariaDB初期設定 [#ha607fae]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# mysql_secure_installation &color(lim...
|/usr/bin/mysql_secure_installation: 行 379: find_mysql_c...
*MariaDB確認 [#c1e0fb71]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# mysql -u root -p &color(lime){← ''M...
|Enter password: &color(lime){← ''MariaDB''の''root''パ...
|MariaDB [(none)]> grant all privileges on test.* to hoge...
|Query OK, 0 rows affected (0.00 sec)|
|MariaDB [(none)]> select user from mysql.user where user...
|+--------+ &br; | user | &br; +--------+ &br...
|MariaDB [(none)]> exit &color(lime){← ログアウト};|
|Bye|
|[root@localhost ~]# mysql -u hogehoge -phogehogepass &c...
|Welcome to the MariaDB monitor. Commands end with ; or ...
|MariaDB [(none)]> create database test; &color(lime){← ...
|Query OK, 1 row affected (0.00 sec)|
|MariaDB [(none)]> show databases; &color(lime){← データ...
|+--------------------+ &br; | Database &#...
|MariaDB [(none)]> use test; &color(lime){← ''test''デー...
|Database changed|
|MariaDB [test]> create table test(num int, name varchar(...
|Query OK, 0 rows affected (0.09 sec)|
|MariaDB [test]> show tables; &color(lime){← テーブル作...
|+----------------+ &br; | Tables_in_test | &br...
|MariaDB [test]> insert into test values(1,'山田太郎'); &...
|Query OK, 1 row affected, 1 warning (0.01 sec)|
|MariaDB [test]> select * from test; &color(lime){← デー...
|+------+--------------+ &br; | num | name ...
|MariaDB [test]> update test set name='山田次郎'; &color(...
|Query OK, 1 row affected (0.03 sec) &br; Rows matched: 1...
|MariaDB [test]> select * from test; &color(lime){← デー...
|+------+--------------+ &br; | num | name ...
|MariaDB [test]> delete from test where num=1; &color(lim...
|Query OK, 1 row affected (0.03 sec)|
|MariaDB [test]> select * from test; &color(lime){← デー...
|Empty set (0.00 sec)|
|MariaDB [test]> drop table test; &color(lime){← ''test'...
|Query OK, 0 rows affected (0.02 sec)|
|MariaDB [test]> show tables; &color(lime){← テーブル削...
|Empty set (0.00 sec)|
|MariaDB [test]> drop database test; &color(lime){← デー...
|Query OK, 0 rows affected (0.00 sec)|
|MariaDB [(none)]> show databases; &color(lime){← データ...
|+--------------------+ &br; | Database &#...
|MariaDB [(none)]> exit &color(lime){← ログアウト};|
|Bye|
|[root@localhost ~]# mysql -u root -p &color(lime){← ''M...
|Enter password: &color(lime){← ''MariaDB''の''root''パ...
|MariaDB [(none)]> revoke all privileges on *.* from hoge...
|Query OK, 0 rows affected (0.00 sec)|
|MariaDB [(none)]> delete from mysql.user where user='hog...
|Query OK, 1 row affected (0.00 sec)|
|MariaDB [(none)]> select user from mysql.user where user...
|Empty set (0.00 sec)|
|MariaDB [(none)]> flush privileges; &color(lime){← hoge...
|Query OK, 0 rows affected (0.00 sec)|
|MariaDB [(none)]> exit &color(lime){← ログアウト};|
|Bye|
終了行:
[[CentOS7]]
*データベースサーバー構築(MariaDB) [#jc1e28c8]
データベースサーバーは、サーバー上のデータベースをクライ...
ここでは、リレーショナル型データベースのデータベースサー...
*MariaDBインストール [#t6789e00]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# yum -y install mariadb-server &color...
*MariaDB設定 [#g476dd74]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /etc/my.cnf.d/server.cnf &color(l...
|[mysqld] &br; character-set-server = utf8 &color(lime){←...
*MariaDB起動 [#k90a8359]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# systemctl start mariadb &color(lime)...
|[root@localhost ~]# systemctl enable mariadb &color(lime...
*MariaDB初期設定 [#ha607fae]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# mysql_secure_installation &color(lim...
|/usr/bin/mysql_secure_installation: 行 379: find_mysql_c...
*MariaDB確認 [#c1e0fb71]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# mysql -u root -p &color(lime){← ''M...
|Enter password: &color(lime){← ''MariaDB''の''root''パ...
|MariaDB [(none)]> grant all privileges on test.* to hoge...
|Query OK, 0 rows affected (0.00 sec)|
|MariaDB [(none)]> select user from mysql.user where user...
|+--------+ &br; | user | &br; +--------+ &br...
|MariaDB [(none)]> exit &color(lime){← ログアウト};|
|Bye|
|[root@localhost ~]# mysql -u hogehoge -phogehogepass &c...
|Welcome to the MariaDB monitor. Commands end with ; or ...
|MariaDB [(none)]> create database test; &color(lime){← ...
|Query OK, 1 row affected (0.00 sec)|
|MariaDB [(none)]> show databases; &color(lime){← データ...
|+--------------------+ &br; | Database &#...
|MariaDB [(none)]> use test; &color(lime){← ''test''デー...
|Database changed|
|MariaDB [test]> create table test(num int, name varchar(...
|Query OK, 0 rows affected (0.09 sec)|
|MariaDB [test]> show tables; &color(lime){← テーブル作...
|+----------------+ &br; | Tables_in_test | &br...
|MariaDB [test]> insert into test values(1,'山田太郎'); &...
|Query OK, 1 row affected, 1 warning (0.01 sec)|
|MariaDB [test]> select * from test; &color(lime){← デー...
|+------+--------------+ &br; | num | name ...
|MariaDB [test]> update test set name='山田次郎'; &color(...
|Query OK, 1 row affected (0.03 sec) &br; Rows matched: 1...
|MariaDB [test]> select * from test; &color(lime){← デー...
|+------+--------------+ &br; | num | name ...
|MariaDB [test]> delete from test where num=1; &color(lim...
|Query OK, 1 row affected (0.03 sec)|
|MariaDB [test]> select * from test; &color(lime){← デー...
|Empty set (0.00 sec)|
|MariaDB [test]> drop table test; &color(lime){← ''test'...
|Query OK, 0 rows affected (0.02 sec)|
|MariaDB [test]> show tables; &color(lime){← テーブル削...
|Empty set (0.00 sec)|
|MariaDB [test]> drop database test; &color(lime){← デー...
|Query OK, 0 rows affected (0.00 sec)|
|MariaDB [(none)]> show databases; &color(lime){← データ...
|+--------------------+ &br; | Database &#...
|MariaDB [(none)]> exit &color(lime){← ログアウト};|
|Bye|
|[root@localhost ~]# mysql -u root -p &color(lime){← ''M...
|Enter password: &color(lime){← ''MariaDB''の''root''パ...
|MariaDB [(none)]> revoke all privileges on *.* from hoge...
|Query OK, 0 rows affected (0.00 sec)|
|MariaDB [(none)]> delete from mysql.user where user='hog...
|Query OK, 1 row affected (0.00 sec)|
|MariaDB [(none)]> select user from mysql.user where user...
|Empty set (0.00 sec)|
|MariaDB [(none)]> flush privileges; &color(lime){← hoge...
|Query OK, 0 rows affected (0.00 sec)|
|MariaDB [(none)]> exit &color(lime){← ログアウト};|
|Bye|
ページ名: