2012-11-20

CentOS 6.3 最小構成からのスタート
(6)MySQLの起動

インストール直後は、自動起動しない。


# chkconfig 
auditd          0:off 1:off 2:on 3:on 4:on 5:on 6:off
crond           0:off 1:off 2:on 3:on 4:on 5:on 6:off
httpd           0:off 1:off 2:off 3:off 4:off 5:off 6:off
ip6tables       0:off 1:off 2:on 3:on 4:on 5:on 6:off
iptables        0:off 1:off 2:on 3:on 4:on 5:on 6:off
lvm2-monitor    0:off 1:on 2:on 3:on 4:on 5:on 6:off
mysqld          0:off 1:off 2:off 3:off 4:off 5:off 6:off
netconsole      0:off 1:off 2:off 3:off 4:off 5:off 6:off
netfs           0:off 1:off 2:off 3:on 4:on 5:on 6:off
network         0:off 1:off 2:on 3:on 4:on 5:on 6:off
postfix         0:off 1:off 2:on 3:on 4:on 5:on 6:off
rdisc           0:off 1:off 2:off 3:off 4:off 5:off 6:off
restorecond     0:off 1:off 2:off 3:off 4:off 5:off 6:off
rsyslog         0:off 1:off 2:on 3:on 4:on 5:on 6:off
saslauthd       0:off 1:off 2:off 3:off 4:off 5:off 6:off
sshd            0:off 1:off 2:on 3:on 4:on 5:on 6:off
udev-post       0:off 1:on 2:on 3:on 4:on 5:on 6:off
# 


なので、自動起動するようにする。

# chkconfig mysqld on


起動する。

# service 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 localhost.localdomain 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 /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

                                                          [  OK  ]
mysqld を起動中:                                           [  OK  ]
# 

と、ここでもMySQL起動の際にメッセージが表示される。
インストール直後は、rootのパスワードが設定されていないので、
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'

のどちらかを実行してパスワードを設定する。
もしくは、
/usr/bin/mysql_secure_installation

を実行すれば、
  • rootのパスワード設定
  • anonymousユーザーの削除
  • リモートホストからのrootのログイン拒否
  • testデータベースの削除
をステップ実行で実施できる。

0 件のコメント:

コメントを投稿

綺麗に見せることに全振りした操法大会の訓練を50日間するよりも、月1回でいいから基本的な操作方法の訓練を実施すべきだと思うのは俺だけか

 7月に県の消防操法大会がある。 市内分団の持ち回り制で、今年はうちの分団が出場する。 俺も前回回ってきたときに、選手として出た。 訓練が5月から始まっている。 週5日。 訓練時間は2時間だけど、その前に準備する時間もあり、訓練後の撤収時間も必要だから、拘束時間は約3時間。 俺が...