156 lines
20 KiB
Markdown
156 lines
20 KiB
Markdown
---
|
||
title: MySQLのインストール
|
||
author: kazu634
|
||
date: 2009-05-31
|
||
wordtwit_post_info:
|
||
- '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";}}'
|
||
categories:
|
||
- mysql
|
||
- ubuntu
|
||
|
||
---
|
||
<div class="section">
|
||
<p>
|
||
MySQLをインストールしました。とりあえずインストール時のログだけ貼り付けておきます:
|
||
</p>
|
||
|
||
<pre class="syntax-highlight">
|
||
kazu634@kazu634-desktop% aptitude show mysql-common /var/samba/log <span class="synStatement">[</span><span class="synConstant">1891</span><span class="synStatement">]</span>
|
||
<span class="synStatement">[</span>sudo<span class="synStatement">]</span> password <span class="synStatement">for</span> kazu634:
|
||
パッケージ: mysql-common
|
||
状態: インストール済み
|
||
自動的にインストールされた: yes
|
||
バージョン: <span class="synConstant">5</span>.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10
|
||
優先度: 任意
|
||
セクション: misc
|
||
メンテナ: Ubuntu Core Developers <span class="synStatement"><</span>ubuntu-devel-discuss@lists.ubuntu.com<span class="synStatement">></span>
|
||
展開サイズ: 147k
|
||
説明: MySQL database common files
|
||
MySQL is a fast, stable and <span class="synStatement">true</span> multi-user, multi-threaded SQL database server. SQL <span class="synStatement">(</span>Structured
|
||
Query Language<span class="synStatement">)</span> is the most popular database query language <span class="synStatement">in</span> 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 <span class="synStatement">(</span>e.g. /etc/mysql/my.cnf<span class="synStatement">)</span>.
|
||
ホームページ: http://dev.mysql.com/
|
||
kazu634@kazu634-desktop% aptitude show mysql-server /var/samba/log <span class="synStatement">[</span><span class="synConstant">1892</span><span class="synStatement">]</span>
|
||
パッケージ: mysql-server
|
||
状態: インストールされていません
|
||
バージョン: <span class="synConstant">5</span>.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10
|
||
優先度: 任意
|
||
セクション: misc
|
||
メンテナ: Ubuntu Core Developers <span class="synStatement"><</span>ubuntu-devel-discuss@lists.ubuntu.com<span class="synStatement">></span>
|
||
展開サイズ: <span class="synConstant">98</span>.3k
|
||
依存: mysql-server<span class="synConstant">-5</span>.<span class="synConstant"></span>
|
||
提供元: mysql-server<span class="synConstant">-5</span>.<span class="synConstant"></span>
|
||
説明: MySQL database server <span class="synStatement">(</span>metapackage depending on the latest version<span class="synStatement">)</span>
|
||
This is an empty package that depends on the current <span class="synStatement">"</span><span class="synConstant">best</span><span class="synStatement">"</span> version of mysql-server <span class="synStatement">(</span>currently
|
||
mysql-server<span class="synConstant">-5</span>.<span class="synConstant"></span><span class="synStatement">)</span>, as determined by the MySQL maintainers. Install this package <span class="synStatement">if</span> in doubt about
|
||
which MySQL version you need. That will <span class="synStatement">install</span> the version recommended by the package maintainers.
|
||
MySQL is a fast, stable and <span class="synStatement">true</span> multi-user, multi-threaded SQL database server. SQL <span class="synStatement">(</span>Structured
|
||
Query Language<span class="synStatement">)</span> 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 <span class="synStatement">install</span> mysql-server /var/samba/log <span class="synStatement">[</span><span class="synConstant">1893</span><span class="synStatement">]</span>
|
||
パッケージリストを読み込んでいます... 完了
|
||
依存関係ツリーを作成しています
|
||
状態情報を読み取っています... 完了
|
||
拡張状態情報を読み込んでいます
|
||
パッケージの状態を初期化しています... 完了
|
||
以下の新規パッケージがインストールされます:
|
||
libdbd-mysql-perl<span class="synSpecial">{</span>a<span class="synSpecial">}</span> libdbi-perl<span class="synSpecial">{</span>a<span class="synSpecial">}</span> libhtml-template-perl<span class="synSpecial">{</span>a<span class="synSpecial">}</span> libnet-<span class="synStatement">daemon</span>-perl<span class="synSpecial">{</span>a<span class="synSpecial">}</span>
|
||
libplrpc-perl<span class="synSpecial">{</span>a<span class="synSpecial">}</span> mysql-client<span class="synConstant">-5</span>.<span class="synConstant"></span><span class="synSpecial">{</span>a<span class="synSpecial">}</span> mysql-server mysql-server<span class="synConstant">-5</span>.<span class="synConstant"></span><span class="synSpecial">{</span>a<span class="synSpecial">}</span>
|
||
mysql-server-core<span class="synConstant">-5</span>.<span class="synConstant"></span><span class="synSpecial">{</span>a<span class="synSpecial">}</span>
|
||
<span class="synConstant"></span> 個のパッケージを更新、 <span class="synConstant">9</span> 個を新たにインストール、 <span class="synConstant"></span> 個を削除予定、<span class="synConstant"></span> 個が更新されていない。
|
||
<span class="synConstant">35</span>.9MB のアーカイブを取得する必要があります。 展開後に 110MB のディスク領域が新たに消費されます。
|
||
先に進みますか? <span class="synStatement">[</span>Y/n/?<span class="synStatement">]</span> y
|
||
拡張状態情報を書き込んでいます... 完了
|
||
取得:<span class="synConstant">1</span> http://jp.archive.ubuntu.com jaunty/main libnet-<span class="synStatement">daemon</span>-perl <span class="synConstant"></span>.<span class="synConstant">43-1</span> <span class="synStatement">[</span><span class="synConstant">46</span>.9kB<span class="synStatement">]</span>
|
||
取得:<span class="synConstant">2</span> http://jp.archive.ubuntu.com jaunty/main libplrpc-perl <span class="synConstant"></span>.<span class="synConstant">2020-1</span> <span class="synStatement">[</span><span class="synConstant">36</span>.0kB<span class="synStatement">]</span>
|
||
取得:<span class="synConstant">3</span> http://jp.archive.ubuntu.com jaunty/main libdbi-perl <span class="synConstant">1</span>.<span class="synConstant">607-1</span> <span class="synStatement">[</span>791kB<span class="synStatement">]</span>
|
||
取得:<span class="synConstant">4</span> http://jp.archive.ubuntu.com jaunty/main libdbd-mysql-perl <span class="synConstant">4</span>.<span class="synConstant">008-1</span> <span class="synStatement">[</span>133kB<span class="synStatement">]</span>
|
||
取得:<span class="synConstant">5</span> http://jp.archive.ubuntu.com jaunty/main mysql-client<span class="synConstant">-5</span>.<span class="synConstant"></span> <span class="synConstant">5</span>.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10 <span class="synStatement">[</span>7877kB<span class="synStatement">]</span>
|
||
取得:<span class="synConstant">6</span> http://jp.archive.ubuntu.com jaunty/main mysql-server-core<span class="synConstant">-5</span>.<span class="synConstant"></span> <span class="synConstant">5</span>.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10 <span class="synStatement">[</span>3348kB<span class="synStatement">]</span>
|
||
取得:<span class="synConstant">7</span> http://jp.archive.ubuntu.com jaunty/main mysql-server<span class="synConstant">-5</span>.<span class="synConstant"></span> <span class="synConstant">5</span>.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10 <span class="synStatement">[</span><span class="synConstant">23</span>.6MB<span class="synStatement">]</span>
|
||
取得:<span class="synConstant">8</span> http://jp.archive.ubuntu.com jaunty/main libhtml-template-perl <span class="synConstant">2</span>.<span class="synConstant">9-1</span> <span class="synStatement">[</span><span class="synConstant">65</span>.8kB<span class="synStatement">]</span>
|
||
取得:<span class="synConstant">9</span> http://jp.archive.ubuntu.com jaunty/main mysql-server <span class="synConstant">5</span>.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10 <span class="synStatement">[</span><span class="synConstant">57</span>.0kB<span class="synStatement">]</span>
|
||
<span class="synConstant">35</span>.9MB を 26s 秒でダウンロードしました <span class="synStatement">(</span>1363kB/s<span class="synStatement">)</span>
|
||
パッケージを事前設定しています ...
|
||
未選択パッケージ libnet-<span class="synStatement">daemon</span>-perl を選択しています。
|
||
<span class="synStatement">(</span>データベースを読み込んでいます ... 現在 <span class="synConstant">126136</span> 個のファイルとディレクトリがインストールされています。<span class="synStatement">)</span>
|
||
<span class="synStatement">(</span>.../libnet-<span class="synStatement">daemon</span>-perl_0.<span class="synConstant">43</span>-1_all.deb から<span class="synStatement">)</span> libnet-<span class="synStatement">daemon</span>-perl を展開しています...
|
||
未選択パッケージ libplrpc-perl を選択しています。
|
||
<span class="synStatement">(</span>.../libplrpc-perl_0.<span class="synConstant">2020</span>-1_all.deb から<span class="synStatement">)</span> libplrpc-perl を展開しています...
|
||
未選択パッケージ libdbi-perl を選択しています。
|
||
<span class="synStatement">(</span>.../libdbi-perl_1.<span class="synConstant">607</span>-1_i386.deb から<span class="synStatement">)</span> libdbi-perl を展開しています...
|
||
未選択パッケージ libdbd-mysql-perl を選択しています。
|
||
<span class="synStatement">(</span>.../libdbd-mysql-perl_4.<span class="synConstant">008</span>-1_i386.deb から<span class="synStatement">)</span> libdbd-mysql-perl を展開しています...
|
||
未選択パッケージ mysql-client<span class="synConstant">-5</span>.<span class="synConstant"></span> を選択しています。
|
||
<span class="synStatement">(</span>.../mysql-client<span class="synConstant">-5</span>.0_5.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10_i386.deb から<span class="synStatement">)</span> mysql-client<span class="synConstant">-5</span>.<span class="synConstant"></span> を展開しています...
|
||
未選択パッケージ mysql-server-core<span class="synConstant">-5</span>.<span class="synConstant"></span> を選択しています。
|
||
<span class="synStatement">(</span>.../mysql-server-core<span class="synConstant">-5</span>.0_5.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10_i386.deb から<span class="synStatement">)</span> mysql-server-core<span class="synConstant">-5</span>.<span class="synConstant"></span> を展<span class="synComment">開##ています...</span>
|
||
未選択パッケージ mysql-server<span class="synConstant">-5</span>.<span class="synConstant"></span> を選択しています。
|
||
<span class="synStatement">(</span>.../mysql-server<span class="synConstant">-5</span>.0_5.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10_i386.deb から<span class="synStatement">)</span> mysql-server<span class="synConstant">-5</span>.<span class="synConstant"></span> を展開しています...
|
||
未選択パッケージ libhtml-template-perl を選択しています。
|
||
<span class="synStatement">(</span>.../libhtml-template-perl_2.<span class="synConstant">9</span>-1_all.deb から<span class="synStatement">)</span> libhtml-template-perl を展開しています...
|
||
未選択パッケージ mysql-server を選択しています。
|
||
<span class="synStatement">(</span>.../mysql-server_5.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10_all.deb から<span class="synStatement">)</span> mysql-server を展開しています...
|
||
man-db のトリガを処理しています ...
|
||
libnet-<span class="synStatement">daemon</span>-perl <span class="synStatement">(</span><span class="synConstant"></span>.<span class="synConstant">43-1</span><span class="synStatement">)</span> を設定しています ...
|
||
libplrpc-perl <span class="synStatement">(</span><span class="synConstant"></span>.<span class="synConstant">2020-1</span><span class="synStatement">)</span> を設定しています ...
|
||
libdbi-perl <span class="synStatement">(</span><span class="synConstant">1</span>.<span class="synConstant">607-1</span><span class="synStatement">)</span> を設定しています ...
|
||
libdbd-mysql-perl <span class="synStatement">(</span><span class="synConstant">4</span>.<span class="synConstant">008-1</span><span class="synStatement">)</span> を設定しています ...
|
||
mysql-client<span class="synConstant">-5</span>.<span class="synConstant"></span> <span class="synStatement">(</span><span class="synConstant">5</span>.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10<span class="synStatement">)</span> を設定しています ...
|
||
mysql-server-core<span class="synConstant">-5</span>.<span class="synConstant"></span> <span class="synStatement">(</span><span class="synConstant">5</span>.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10<span class="synStatement">)</span> を設定しています ...
|
||
mysql-server<span class="synConstant">-5</span>.<span class="synConstant"></span> <span class="synStatement">(</span><span class="synConstant">5</span>.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10<span class="synStatement">)</span> を設定しています ...
|
||
* Stopping MySQL database server mysqld <span class="synStatement">[</span> OK <span class="synStatement">]</span>
|
||
* Reloading AppArmor profiles ... <span class="synStatement">[</span> OK <span class="synStatement">]</span>
|
||
* Starting MySQL database server mysqld <span class="synStatement">[</span> OK <span class="synStatement">]</span>
|
||
* Checking <span class="synStatement">for</span> corrupt, not cleanly closed and upgrade needing tables.
|
||
libhtml-template-perl <span class="synStatement">(</span><span class="synConstant">2</span>.<span class="synConstant">9-1</span><span class="synStatement">)</span> を設定しています ...
|
||
mysql-server <span class="synStatement">(</span><span class="synConstant">5</span>.<span class="synConstant">1</span>.30really5.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10<span class="synStatement">)</span> を設定しています ...
|
||
パッケージリストを読み込んでいます... 完了
|
||
依存関係ツリーを作成しています
|
||
状態情報を読み取っています... 完了
|
||
拡張状態情報を読み込んでいます
|
||
パッケージの状態を初期化しています... 完了
|
||
拡張状態情報を書き込んでいます... 完了
|
||
</pre>
|
||
|
||
<p>
|
||
このときすでにMySQLで管理者権限のパスワードを設定しているので、起動するにはとりあえずこんな感じでコマンドをたたく:
|
||
</p>
|
||
|
||
<pre class="syntax-highlight">
|
||
kazu634@kazu634-desktop% mysql <span class="synSpecial">-u</span> root <span class="synSpecial">-p</span> /var/samba/log <span class="synStatement">[</span><span class="synConstant">1898</span><span class="synStatement">]</span>
|
||
Enter password:
|
||
Welcome to the MySQL monitor. Commands end with <span class="synStatement">;</span> or \g.
|
||
Your MySQL connection id is <span class="synConstant">40</span>
|
||
Server version: <span class="synConstant">5</span>.<span class="synConstant"></span>.<span class="synConstant">75</span>-0ubuntu10 <span class="synStatement">(</span>Ubuntu<span class="synStatement">)</span>
|
||
Type <span class="synStatement">'</span><span class="synConstant">help;</span><span class="synStatement">'</span> or <span class="synStatement">'</span><span class="synConstant">\h</span><span class="synStatement">'</span> <span class="synStatement">for</span> <span class="synStatement">help</span>. Type <span class="synStatement">'</span><span class="synConstant">\c</span><span class="synStatement">'</span> to <span class="synStatement">clear</span> the buffer.
|
||
mysql<span class="synStatement">></span> show
|
||
-<span class="synStatement">></span> database
|
||
-<span class="synStatement">></span> <span class="synStatement">;</span>
|
||
ERROR <span class="synConstant">1064</span> <span class="synStatement">(</span><span class="synConstant">42000</span><span class="synStatement">)</span>: You have an error <span class="synStatement">in</span> your SQL syntax<span class="synStatement">;</span> check the manual that corresponds to your MySQL server version <span class="synStatement">for</span> the right syntax to use near <span class="synStatement">'</span><span class="synConstant">database</span><span class="synStatement">'</span> at line <span class="synConstant">2</span>
|
||
mysql<span class="synStatement">></span> show databases<span class="synStatement">;</span>
|
||
+--------------------+
|
||
<span class="synStatement">|</span> Database <span class="synStatement">|</span>
|
||
+--------------------+
|
||
<span class="synStatement">|</span> information_schema <span class="synStatement">|</span>
|
||
<span class="synStatement">|</span> mysql <span class="synStatement">|</span>
|
||
+--------------------+
|
||
<span class="synConstant">2</span> rows <span class="synStatement">in</span> <span class="synStatement">set</span> <span class="synStatement">(</span><span class="synConstant"></span>.<span class="synConstant">00</span> sec<span class="synStatement">)</span>
|
||
</pre>
|
||
|
||
<h4>
|
||
参考にしたサイト
|
||
</h4>
|
||
|
||
<ul>
|
||
<li>
|
||
<a href="http://builder.japan.zdnet.com/news/story/0,3800079086,20384129,00.htm" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://builder.japan.zdnet.com/news/story/0,3800079086,20384129,00.htm', 'UbuntuにLAMPサーバを手早くインストールする方法 – builder by ZDNet Japan');" target="_blank">UbuntuにLAMPサーバを手早くインストールする方法 – builder by ZDNet Japan</a>
|
||
</li>
|
||
<li>
|
||
<a href="http://pierre.vg/x/modules/pukiwiki/?MySQL%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EB%A1%CADebian%CA%D4%A1%CB" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://pierre.vg/x/modules/pukiwiki/?MySQL%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EB%A1%CADebian%CA%D4%A1%CB', 'Debian(Sarge)でMySQLサーバ-MySQLインストール(Debian編)-PukiWiki – ぴえ~るの活動日記');" target="_blank">Debian(Sarge)でMySQLサーバ-MySQLインストール(Debian編)-PukiWiki – ぴえ~るの活動日記</a>
|
||
</li>
|
||
</ul>
|
||
</div>
|