仮想環境に環境を作る -- MySQL [UNIX環境]
このブログの主題からはちょっと横道です。
でも、個人的にやりたいことをするために仮想環境を作っている訳で、その一つがRDBMSを使えるようにするということです。今回はMySQLを入れてみました。ほかにもPostgreSQLやsqliteなどがありますが、それらはまたの機会に。
コマンドラインでRDBMSに接続できればよいのであれば、以下のrpmをインストールすればよいです。
- mysql-community-server
- mysql-community-server-client
アプリケーションを作る場合は、それに応じたライブラリなどがいるでしょう。近い将来Tomcatからアクセスしたいので、今回は"mysql-connector-java"も入れてみます。YaSTで上記2つのrpmを合わせてインストールしてみると、難しいことなく終わってしまいました。(以下、斜字体は入力する項目です。)
admin@gelmann:~> mysql -u root -p(次回予定:「仮想環境に環境を作る -- Tomcat」あるいは「ほかのOSを仮想環境に」)
Enter password:*****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.46-log SUSE MySQL RPM
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)
mysql>quit
コメント 0