XREA+(XREAの有料サービス)では、データベースを最大5つまで作成できます。
作成そのものは簡単で、管理画面(図1)でデータベース名を選択して[作成]ボタンをクリックするだけです。
図1 データベースの作成(データベース名を選択)
注意しないといけないのは、データベース名と同じ名前のデータベースユーザが作成されることです。
データベース diaspar_2 にアクセスするには、データベースユーザ diaspar_2 を使用します。
ここでは2つのデータベース、diaspar と diaspar_2 を作成して、
データベースが作成されていることを確認してみます。
上述の通り、データベースの作成は簡単なので、以下は確認作業について書きます。
最初に、データベースユーザ diaspar を使用して、
データベース diaspar が作成されていることを確認します。
-bash-2.05b$ mysql -u diaspar --password=**********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 209111 to server version: 5.0.22-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| diaspar | ← データベース diaspar が作成されている
| test |
+--------------------+
3 rows in set (0.00 sec)
mysql> \q
Bye
|
次に、データベースユーザ diaspar_2 を使用して、
データベース diaspar_2 が作成されていることを確認します。
-bash-2.05b$ mysql -u diaspar_2 --password=**********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 209127 to server version: 5.0.22-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| diaspar_2 | ← データベース diaspar_2 が作成されている
| test |
+--------------------+
3 rows in set (0.00 sec)
mysql> \q
Bye
|