blog/content/post/2009/05/31/2009-05-31-00001166.md

20 KiB
Raw Blame History

title author date wordtwit_post_info categories
MySQLのインストール kazu634 2009-05-31
O:8:"stdClass":13:{s:6:"manual";b:0;s:11:"tweet_times";i:1;s:5:"delay";i:0;s:7:"enabled";i:1;s:10:"separation";s:2:"60";s:7:"version";s:3:"3.7";s:14:"tweet_template";b:0;s:6:"status";i:2;s:6:"result";a:0:{}s:13:"tweet_counter";i:2;s:13:"tweet_log_ids";a:1:{i:0;i:4625;}s:9:"hash_tags";a:0:{}s:8:"accounts";a:1:{i:0;s:7:"kazu634";}}
mysql
ubuntu

MySQLをインストールしました。とりあえずインストール時のログだけ貼り付けておきます:

kazu634@kazu634-desktop% aptitude show mysql-common                           /var/samba/log [1891]
[sudo] password for kazu634:
パッケージ: mysql-common
状態: インストール済み
自動的にインストールされた: yes
バージョン: 5.1.30really5..75-0ubuntu10
優先度: 任意
セクション: misc
メンテナ: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
展開サイズ: 147k
説明: MySQL database common files
MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured
Query Language) is the most popular database query language in the world. The main goals of MySQL
are speed, robustness and ease of use.
This package includes files needed by all versions of the client library (e.g. /etc/mysql/my.cnf).
ホームページ: http://dev.mysql.com/
kazu634@kazu634-desktop% aptitude show mysql-server                           /var/samba/log [1892]
パッケージ: mysql-server
状態: インストールされていません
バージョン: 5.1.30really5..75-0ubuntu10
優先度: 任意
セクション: misc
メンテナ: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
展開サイズ: 98.3k
依存: mysql-server-5.
提供元: mysql-server-5.
説明: MySQL database server (metapackage depending on the latest version)
This is an empty package that depends on the current "best" version of mysql-server (currently
mysql-server-5.), as determined by the MySQL maintainers. Install this package if in doubt about
which MySQL version you need. That will install the version recommended by the package maintainers.
MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured
Query Language) is the most popular database query language in the world. The main goals of MySQL
are speed, robustness and ease of use.
ホームページ: http://dev.mysql.com/
kazu634@kazu634-desktop% aptitude install mysql-server                        /var/samba/log [1893]
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
拡張状態情報を読み込んでいます
パッケージの状態を初期化しています... 完了
以下の新規パッケージがインストールされます:
libdbd-mysql-perl{a} libdbi-perl{a} libhtml-template-perl{a} libnet-daemon-perl{a}
libplrpc-perl{a} mysql-client-5.{a} mysql-server mysql-server-5.{a}
mysql-server-core-5.{a}
 個のパッケージを更新、 9 個を新たにインストール、  個を削除予定、 個が更新されていない。
35.9MB のアーカイブを取得する必要があります。 展開後に 110MB のディスク領域が新たに消費されます。
先に進みますか? [Y/n/?] y
拡張状態情報を書き込んでいます... 完了
取得:1 http://jp.archive.ubuntu.com jaunty/main libnet-daemon-perl .43-1 [46.9kB]
取得:2 http://jp.archive.ubuntu.com jaunty/main libplrpc-perl .2020-1 [36.0kB]
取得:3 http://jp.archive.ubuntu.com jaunty/main libdbi-perl 1.607-1 [791kB]
取得:4 http://jp.archive.ubuntu.com jaunty/main libdbd-mysql-perl 4.008-1 [133kB]
取得:5 http://jp.archive.ubuntu.com jaunty/main mysql-client-5. 5.1.30really5..75-0ubuntu10 [7877kB]
取得:6 http://jp.archive.ubuntu.com jaunty/main mysql-server-core-5. 5.1.30really5..75-0ubuntu10 [3348kB]
取得:7 http://jp.archive.ubuntu.com jaunty/main mysql-server-5. 5.1.30really5..75-0ubuntu10 [23.6MB]
取得:8 http://jp.archive.ubuntu.com jaunty/main libhtml-template-perl 2.9-1 [65.8kB]
取得:9 http://jp.archive.ubuntu.com jaunty/main mysql-server 5.1.30really5..75-0ubuntu10 [57.0kB]
35.9MB を 26s 秒でダウンロードしました (1363kB/s)
パッケージを事前設定しています ...
未選択パッケージ libnet-daemon-perl を選択しています。
(データベースを読み込んでいます ... 現在 126136 個のファイルとディレクトリがインストールされています。)
(.../libnet-daemon-perl_0.43-1_all.deb から) libnet-daemon-perl を展開しています...
未選択パッケージ libplrpc-perl を選択しています。
(.../libplrpc-perl_0.2020-1_all.deb から) libplrpc-perl を展開しています...
未選択パッケージ libdbi-perl を選択しています。
(.../libdbi-perl_1.607-1_i386.deb から) libdbi-perl を展開しています...
未選択パッケージ libdbd-mysql-perl を選択しています。
(.../libdbd-mysql-perl_4.008-1_i386.deb から) libdbd-mysql-perl を展開しています...
未選択パッケージ mysql-client-5. を選択しています。
(.../mysql-client-5.0_5.1.30really5..75-0ubuntu10_i386.deb から) mysql-client-5. を展開しています...
未選択パッケージ mysql-server-core-5. を選択しています。
(.../mysql-server-core-5.0_5.1.30really5..75-0ubuntu10_i386.deb から) mysql-server-core-5. を展開##ています...
未選択パッケージ mysql-server-5. を選択しています。
(.../mysql-server-5.0_5.1.30really5..75-0ubuntu10_i386.deb から) mysql-server-5. を展開しています...
未選択パッケージ libhtml-template-perl を選択しています。
(.../libhtml-template-perl_2.9-1_all.deb から) libhtml-template-perl を展開しています...
未選択パッケージ mysql-server を選択しています。
(.../mysql-server_5.1.30really5..75-0ubuntu10_all.deb から) mysql-server を展開しています...
man-db のトリガを処理しています ...
libnet-daemon-perl (.43-1) を設定しています ...
libplrpc-perl (.2020-1) を設定しています ...
libdbi-perl (1.607-1) を設定しています ...
libdbd-mysql-perl (4.008-1) を設定しています ...
mysql-client-5. (5.1.30really5..75-0ubuntu10) を設定しています ...
mysql-server-core-5. (5.1.30really5..75-0ubuntu10) を設定しています ...
mysql-server-5. (5.1.30really5..75-0ubuntu10) を設定しています ...
* Stopping MySQL database server mysqld                                                     [ OK ]
* Reloading AppArmor profiles ...                                                           [ OK ]
* Starting MySQL database server mysqld                                                     [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
libhtml-template-perl (2.9-1) を設定しています ...
mysql-server (5.1.30really5..75-0ubuntu10) を設定しています ...
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
拡張状態情報を読み込んでいます
パッケージの状態を初期化しています... 完了
拡張状態情報を書き込んでいます... 完了

このときすでにMySQLで管理者権限のパスワードを設定しているので、起動するにはとりあえずこんな感じでコマンドをたたく:

kazu634@kazu634-desktop% mysql -u root -p                                     /var/samba/log [1898]
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 40
Server version: 5..75-0ubuntu10 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show
-> database
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 2
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
+--------------------+
2 rows in set (.00 sec)

参考にしたサイト