[c*******@hostname ~]$ su -
Password: パスワード入力(不可視)
[root@hostname ~]#
2. MySQLサーバをインストールします。
既にMySQLサーバをインストール済みの場合はインストール作業を飛ばし次へ。
[root@hostname ~]# vinstall mysql
installing mysql
Checking for conflicting packages
Installing MySQL 5.1.55. Please wait....
Checking to see if DB is created
Setting mysqld to start every time.
and starting mysqld now.
Enter the new MySQL root password: パスワード入力(不可視)
Enter the new MySQL root password (again): パスワード入力(不可視)
Installation of MySQL 5.1.55 succeeded.
vinstall done
[root@hostname ~]# mysql -u root -p
Enter password: パスワード入力(不可視)
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 3
Server version: 5.1.55 Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> create database wp;Query OK, 1 row affected (0.00 sec)
mysql> grant all on wp.* to wp_user@localhost identified by 'Passw0rddayo!';Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
[root@hostname ~]#
4. 作成したユーザとパスワードで希望のデータベースにアクセスできることを確認します。
「mysql>」の表示が確認できれば問題ありません。
[root@hostname ~]#mysql -u wp_user -p
Enter password: パスワード入力(不可視)
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 8
Server version: 5.1.55 Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>exitBye
[root@hostname ~]#
コメント
この記事のおかげで本当に助かりました。ありがとうございました。
こちらの記事のおかげで、丸1日格闘してたことが1時間でクリアできました!
感謝です。
OCNはこちらの記事を紹介するべきだよ、本当…。