とりあえずMYSQLをアンインストールするべと
CENTOSを起動。
あれSSHできない。。IPかえたのかな。。忘れてたんでVIRTUALBOXの
ウィンドウからー/sbin/ifconfig -a
あーブリッジ接続していた。。
んで。
https://www.google.co.jp/search?q=centos+mysql+%E3%82%A2%E3%83%B3%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB&aq=0&oq=CENTOS%E3%80%80MYSQL%E3%80%80%E3%81%82%E3%82%93%E3%81%84&aqs=chrome.1.57j0l3.11309&sourceid=chrome&ie=UTF-8
ぐぐった。
http://weble.org/2011/08/14/centos-mysql-uninstall
http://blog.champierre.com/609
YUMとやらをしてみる。
[root@cent-test01 lib]# /etc/rc.d/init.d/mysqld status
mysqld (pid 2179) を実行中..
まず動いてんだがいいのかなー
[maint01@cent-test01 mysql]$ ls -ltr
合計 20528
drwx------ 2 mysql mysql 4096 1月 31 23:31 test
drwx------ 2 mysql mysql 4096 1月 31 23:31 mysql
-rw-rw---- 1 mysql mysql 5242880 1月 31 23:31 ib_logfile1
-rw-rw---- 1 mysql mysql 10485760 1月 31 23:44 ibdata1
srwxrwxrwx 1 mysql mysql 0 2月 9 15:20 mysql.sock
-rw-rw---- 1 mysql mysql 5242880 2月 9 15:20 ib_logfile0
[maint01@cent-test01 mysql]$
なんかあるし・・
# sudo yum remove mysql
# sudo yum remove mysql-server
# sudo yum remove mysql-libs
-------------------------------
YUM3発
[root@cent-test01 lib]# ls
alternatives dhcpv6 ibmasm multipath rpm xkb
bluetooth games iscsi mysql scrollkeeper yum
dav hal logrotate.status nfs sepolgen
dbus hp3 misc ntp stateless
dhclient hsqldb mlocate random-seed tpm
-------------------------------
YUM1
[root@cent-test01 lib]# yum remove mysql
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.i386 0:5.0.95-5.el5_9 set to be erased
--> Processing Dependency: libmysqlclient.so.15 for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15 for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15 for package: mysql-devel
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-devel
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15) for package: mysql-server
--> Processing Dependency: mysql = 5.0.95-5.el5_9 for package: mysql-server
--> Processing Dependency: mysql = 5.0.95-5.el5_9 for package: mysql-devel
--> Running transaction check
---> Package mysql-devel.i386 0:5.0.95-5.el5_9 set to be erased
---> Package mysql-server.i386 0:5.0.95-5.el5_9 set to be erased
---> Package perl-DBD-MySQL.i386 0:3.0007-2.el5 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
mysql i386 5.0.95-5.el5_9 installed 8.0 M
Removing for dependencies:
mysql-devel i386 5.0.95-5.el5_9 installed 5.6 M
mysql-server i386 5.0.95-5.el5_9 installed 22 M
perl-DBD-MySQL i386 3.0007-2.el5 installed 326 k
Transaction Summary
================================================================================
Remove 4 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : perl-DBD-MySQL 1/4
Erasing : mysql-devel 2/4
Erasing : mysql 3/4
警告: /etc/my.cnf は /etc/my.cnf.rpmsave として保存されました。
Erasing : mysql-server 4/4
警告: /var/log/mysqld.log は /var/log/mysqld.log.rpmsave として保存されました。
Removed:
mysql.i386 0:5.0.95-5.el5_9
Dependency Removed:
mysql-devel.i386 0:5.0.95-5.el5_9 mysql-server.i386 0:5.0.95-5.el5_9
perl-DBD-MySQL.i386 0:3.0007-2.el5
Complete!
-------------------------------
YUM2
[root@cent-test01 lib]# yum remove mysql-server
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: mysql-server
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: mirrors.grandcloud.cn
* updates: ftp.iij.ad.jp
Package(s) mysql-server available, but not installed.
No Packages marked for removal
-------------------------------
YUM3
[root@cent-test01 lib]# yum remove mysql-libs
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: mysql-libs
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: mirrors.grandcloud.cn
* updates: mirrors.tuna.tsinghua.edu.cn
No Packages marked for removal
-------------------------------
2と3はないみたい。。
てかSSH切れたんすが。。コワ
-------------------------------
# tail -f messages
Feb 9 15:23:23 cent-test01 last message repeated 3 times
Feb 9 15:31:24 cent-test01 yum: Erased: perl-DBD-MySQL
Feb 9 15:31:24 cent-test01 yum: Erased: mysql-devel
Feb 9 15:31:24 cent-test01 yum: Erased: mysql
Feb 9 15:31:25 cent-test01 yum: Erased: mysql-server
うーん普通。
[root@cent-test01 mysql]# ls -ltr
合計 20528
drwx------ 2 mysql mysql 4096 1月 31 23:31 test
drwx------ 2 mysql mysql 4096 1月 31 23:31 mysql
-rw-rw---- 1 mysql mysql 5242880 1月 31 23:31 ib_logfile1
-rw-rw---- 1 mysql mysql 10485760 1月 31 23:44 ibdata1
srwxrwxrwx 1 mysql mysql 0 2月 9 15:20 mysql.sock
-rw-rw---- 1 mysql mysql 5242880 2月 9 15:20 ib_logfile0
[root@cent-test01 mysql]# pwd
/var/lib/mysql
設定は残るみたい
[root@cent-test01 log]# /etc/rc.d/init.d/mysqld
bash: /etc/rc.d/init.d/mysqld: そのようなファイルやディレクトリはありません
[root@cent-test01 log]#
おちたぽい
[root@cent-test01 mysql]# /sbin/chkconfig --list |grep mysql
[root@cent-test01 mysql]# /sbin/chkconfig --list |grep mysql
-------------------------------
でもSVNとのときは
yum install mysql mysql-server mysql-devel
て
mysql
mysql-server
mysql-devel
の三種を消ウンスコしたハウズですがぁ
なんかひっかかる、と再度MYSQLインストールしたら起動に失敗。。
[root@cent-test01 etc]# /etc/rc.d/init.d/mysqld start
MySQL Daemon failed to start.
mysqld を起動中: [失敗]
[root@cent-test01 etc]#
-------------------------------
# yum install mysql mysql-server mysql-devel
とやったので、もいぢと
-------------------------------
# sudo yum remove mysql
# sudo yum remove mysql-server
# sudo yum remove mysql-libs
に
# sudo yum remove mysql-devel
とやてみる
すると
[root@cent-test01 etc]# sudo yum remove mysql
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.i386 0:5.0.95-5.el5_9 set to be erased
--> Processing Dependency: libmysqlclient.so.15 for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15 for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15 for package: mysql-devel
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-devel
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15) for package: mysql-server
--> Processing Dependency: mysql = 5.0.95-5.el5_9 for package: mysql-server
--> Processing Dependency: mysql = 5.0.95-5.el5_9 for package: mysql-devel
--> Running transaction check
---> Package mysql-devel.i386 0:5.0.95-5.el5_9 set to be erased
---> Package mysql-server.i386 0:5.0.95-5.el5_9 set to be erased
---> Package perl-DBD-MySQL.i386 0:3.0007-2.el5 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
mysql i386 5.0.95-5.el5_9 installed 8.0 M
Removing for dependencies:
mysql-devel i386 5.0.95-5.el5_9 installed 5.6 M
mysql-server i386 5.0.95-5.el5_9 installed 22 M
perl-DBD-MySQL i386 3.0007-2.el5 installed 326 k
Transaction Summary
================================================================================
Remove 4 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : perl-DBD-MySQL 1/4
Erasing : mysql-devel 2/4
Erasing : mysql 3/4
警告: /etc/my.cnf は /etc/my.cnf.rpmsave として保存されました。
Erasing : mysql-server 4/4
警告: /var/log/mysqld.log は /var/log/mysqld.log.rpmsave として保存されました。
Removed:
mysql.i386 0:5.0.95-5.el5_9
Dependency Removed:
mysql-devel.i386 0:5.0.95-5.el5_9 mysql-server.i386 0:5.0.95-5.el5_9
perl-DBD-MySQL.i386 0:3.0007-2.el5
Complete!
[root@cent-test01 etc]# sudo yum remove mysql-server
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: mysql-server
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: mirrors.tuna.tsinghua.edu.cn
base | 1.1 kB 00:00
extras | 2.1 kB 00:00
updates | 1.9 kB 00:00
Package(s) mysql-server available, but not installed.
No Packages marked for removal
[root@cent-test01 etc]# sudo yum remove mysql-libs
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: mysql-libs
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: mirrors.tuna.tsinghua.edu.cn
No Packages marked for removal
[root@cent-test01 etc]# sudo yum remove mysql-devel
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: mysql-devel
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: mirrors.tuna.tsinghua.edu.cn
Package(s) mysql-devel available, but not installed.
No Packages marked for removal
[root@cent-test01 etc]#
したの3つはないんじゃね?みたいなカンジ
うーん
あと気になるのは
設定ファイル残
https://www.google.co.jp/search?q=centos+mysql+%E3%82%A2%E3%83%B3%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB&aq=0&oq=CENTOS%E3%80%80MYSQL%E3%80%80%E3%81%82%E3%82%93%E3%81%84&aqs=chrome.1.57j0l3.11309&sourceid=chrome&ie=UTF-8#hl=ja&gs_rn=2&gs_ri=serp&tok=RkbbUFJifZUPb9z_UrAoOA&gs_is=1&pq=centos%20mysql%20%E3%82%A2%E3%83%B3%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB&cp=24&gs_id=lv&xhr=t&q=centos+mysql+%E3%82%A2%E3%83%B3%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%80%80%E8%A8%AD%E5%AE%9A&es_nrs=true&pf=p&safe=off&tbo=d&sclient=psy-ab&oq=centos+mysql+%E3%82%A2%E3%83%B3%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%80%80%E8%A8%AD%E5%AE%9A&gs_l=&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&bvm=bv.42080656,d.dGY&fp=b3acd57f15943acb&biw=1745&bih=864&bs=1
http://minagawa.ddo.jp/centos/index.php?e=14&PHPSESSID=j85aga9f55f6sp7u7c4j36k3t7
やはり
/var/lib/mysqlは完全削除すべしみたいだな
-------------------------------
[root@cent-test01 lib]# rm -rf mysql
-------------------------------
おーきたきた
[root@cent-test01 etc]# /etc/rc.d/init.d/mysqld start
MySQL データベースを初期化中: Installing MySQL system tables...
OK
Filling help tables...
OK
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/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h cent-test01 password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/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
[ OK ]
mysqld を起動中: [ OK ]
[root@cent-test01 etc]#