VPS奮闘記[19]:mysqlが起動しない

ServersMan@VPS Standard」で導入したMySQLにrootのパスワード設定などしようとするも、なぜかmysqlが起動していない・・・

[root@dti-vps-srv47 mysql]# /sbin/service mysqld restart
Stopping mysqld: [ OK ]
MySQL Daemon failed to start.
Starting mysqld: [FAILED]

[root@dti-vps-srv47 ~]# mysql
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

「mysql.sock」も生成されていない・・・

いろいろ調べてみると、『MySQLデータを初期化してシステム テーブルを作成』すると解決する可能性有り!

そこで、

[root@dti-vps-srv47 mysql]# /usr/bin/mysql_install_db
WARNING: The host ‘dti-vps-srv47’ could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
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 dti-vps-srv47 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!

[root@dti-vps-srv47 mysql]# /sbin/service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]


★参考URL
 ・[Salt Bridge] MySQL 初期設定
 ・[MySQLのインストール] MySQLのインストール方法 (例:FedoraCore2)
 ・[MySQL 5.1 リファレンスマニュアル] 4.5.3. mysql_install_db — MySQL データ ディレクトリ 初期化スクリプト

スポンサードリンク

コメント

タイトルとURLをコピーしました