前回記事「MovableTypeとMysqlの不具合_2(Mysql4.0系pkg版アンインストール)」
mysql4.0のアンインストール作業を終えたので、続いてmysql4.1のインストール作業。
圧縮ファイルを解凍して移動
#tar zxvf mysql-4.1.7.tar.gz
#cd mysql-4.1.7
コンパイル条件を設定してmakefileの作成
# ./configure --prefix=/usr/local/mysql \
> --with-charset=ujis --with-extra-charsets=all --with-mysqld-user=mysql
コンパイル、インストール開始
#make
#make install
初期DBを生成。
# ./scripts/mysql_install_db
Installing all prepared tables
Fill help tables
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h oregano-esil.ddo.jp password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /usr/local/mysql/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
See the manual for more instructions.
NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/local/mysql/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /usr/local/mysql/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.co
*この後、mysql起動後mysqladminが使えない問題が発生
(mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!)
その問題についてはこちら
続いて権限の変更。(mysql用にmysqlグループ、ユーザを予め追加)
# chown -R root /usr/local/mysql
# chown -R mysql /usr/local/mysql/var
# chrgp -R mysql /usr/local/mysql
mysqlを起動(*mysqlにパスを通しています。パスを通す方法)
#mysqld_safe &
mysql起動の確認
#myqladmin ping
mysqld is alive
rootユーザのパスワード設定
# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost'
(using password: YES)
[root@oregano-esil tmp]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.1.7
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> set password for root@localhost=password('hoge'
);
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
[root@oregano-esil tmp]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 4.1.7
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
これで、movableTypeのdumpを入れれば終了かと思ったけど様々な問題が発生。
文字化け以前に管理画面、ログイン画面を表示できず。
また、何故かapacheの再起動すらできなくなった。