A-TAK.COM

MySQL 5.0.45が入らないよ

※Amazonのアソシエイトとして、A-TAK.COMは適格販売により収入を得ています
※本サイトではその他アフィリエイトも利用しております。

シェア

最近のWebアプリは、というか同じWebアプリでも最新バージョンは、MySQLの新しいバージョンが必要とか言ってくるので、そろそろMySQLのバージョンアップをしようかと、レッツトライ中。
しかし、はいらん。

複数バージョン共存ができないよ

 俺も年をとっていろんなリスクに対して敏感になっているので、いきなり今使っているMySQLをアップグレードというのは避けようとまず考えた。
俺って大人。

共存する場合インストール先を変えたりいろんなことをする必要があるので、ソースからのインストールになりそう。
http://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.0/mysql-5.0.45.tar.gz

いつもホームディレクトリにおいているのだけど、/usr/local/srcに置くのがお作法っぽいので、そこにコピーしてtarで解凍した。
(たぶん)肝心なのがconfigureの設定。ポートとソケットのファイル名(?)とインストール先を変更した。

./configure –prefix=/usr/local/mysql-5.0.45 –with-charset=utf8 –with-extra-charset=all –with-mysqld-user=mysql –with-unix-socket-path=/tmp/mysql-5.0.45.sock –with-tcp-port=3308

こんな感じ。
複数バージョンに関しては、こちらのサイト。
文字コードの指定に関してはこちらのサイトを参考にさせていただきました。
サンクス。

最初、prefixの設定を間違っていて、最後に「/」をつけていたためいろんなパスがおかしくなってまるでだめ夫でした。
ここもはまったけど、このあと正しい指定でconfigureをし直したけど、まったく反映しない。
一旦、make cleanした後にやり直したら、やっとちゃんとしたパスになりました。

もしかしたら落としたソースがだめだったのかもしれない。今は、あとでSRPMで落としたソースを使っていまいろいろやってることころ。
それでも、うまくいってないんですが・・・。

my.cnfが見つからないよ

etcには今動いているMySQLのmy.cnfがあるけど、新しく入れる分はどこに?
しらべてみると、インストール先のvar内に放り込んであげればいいみたい。varは最初は無いからmkdirです。

my.cnfのひな形はshareにmy-medium.cnfとかがあるので、こいつをコピーしてmy.cnfにリネームすればよろし。
なぜかこれも最初はひな形かのパスとかがconfigureで指定した場所になっていなかったり、ポートもソケットもデフォルトのままだったのだけど、何回かやり直してちゃんと書き換わるようになった。
これもmake cleanしてからかなぁ・・・謎です。
一応、make installする度に、事前にインストール先は空にしておいたので、前の設定ファイルが残っているということもないとは思うのだけど。

mysql_install_dbが動かないよ

今、ここで詰まってます。

bin/mysql_install_dbを実行すると以下のような感じでテーブル作成に失敗しているみたいです。意味がわからん。

[root@xxxx mysql]# bin/mysql_install_db
Installing MySQL system tables…
070814 14:04:49 [Warning] ‘/tmp/#sql6814_1_0’ had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed
070814 14:04:49 [Warning] ‘/tmp/#sql6814_1_0’ had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed
ERROR: 1136  Column count doesn’t match value count at row 1
070814 14:04:49 [ERROR] Aborting

070814 14:04:49 [Note] /usr/local/mysql-5.0.45/libexec/mysqld: Shutdown complete

Installation of system tables failed!

Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/local/mysql-5.0.45/libexec/mysqld –skip-grant &
and use the command line tool
/usr/local/mysql-5.0.45/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /usr/local/mysql-5.0.45/bin/mysql -u root mysql
mysql> show tables

Try ‘mysqld –help’ if you have problems with paths. Using –log
gives you a log in /var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: ‘Problems running mysql_install_db’,
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/local/mysql-5.0.45/bin/mysqlbug script!

うーん、さっぱりわけがわかりません。
システムテーブルのインストールに失敗している、と出ている。
ログを見れ!とあるが、/var/lib/mysqlには、今動いているMySQLのログしかなさそうなんだよなぁ。
最初の方で、Warningで文字コードの問題らしきものが出ているので、とりあえず今はconfigureで文字コードをujisにして再トライしているところ。

文字コード指定変えてもだめでした

<

p>再トライだめでした。
とりあえず、文字コード指定なしで再々トライしてみます。
[追記]
どうも文字コードはあまり関係ないっぽい。なんなんだろう。

Installing MySQL system tables…
ERROR: 1136 Column count doesn’t match value count at row 1
070814 17:07:20 [ERROR] Aborting
070814 17:07:20 [Note] /usr/local/mysql-5.0.45/libexec/mysqld: Shutdown complete
Installation of system tables failed!
Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/local/mysql-5.0.45/libexec/mysqld –skip-grant &
and use the command line tool
/usr/local/mysql-5.0.45/bin/mysql to connect to the mysql
database and look at the grant tables:
shell> /usr/local/mysql-5.0.45/bin/mysql -u root mysql
mysql> show tables
Try ‘mysqld –help’ if you have problems with paths. Using –log
gives you a log in /var/lib/mysql that may be helpful.
The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: ‘Problems running mysql_install_db’,
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/local/mysql-5.0.45/bin/mysqlbug script!

MySQL入門以前

posted with amazlet on 07.08.14
石田 豊
毎日コミュニケーションズ (2005/03)
売り上げランキング: 4080
おすすめ度の平均: 4.5

3 書いてある通りに進める必要がある
5 良著
4 先につながる入門書


シェア

投稿日

カテゴリー:

投稿者:

タグ:

カテゴリ一覧