V.mysql

Last-modified: 2006-09-21 (木) 22:08:35
[root@swisspc root]# apt-get install mysql-server
パッケージリストを読みこんでいます... 完了
依存情報ツリーを作成しています... 完了
'mysql-server' として MySQL-server を選択しました
以下のパッケージが新たにインストールされます:
 MySQL-server
アップグレード: 0 個, 新規インストール: 1 個, 削除: 0 個, 保留: 0 個
7395kB のアーカイブを取得する必要があります。
展開後に 14.2MB のディスク容量が追加消費されます。
取得:1 http://updates.vinelinux.org 3.2/i386/plus MySQL-server 4.0.25-0vl0 [7395kB]
7395kB を 4s 秒で取得しました (1793kB/s)
変更を適用しています...
準備中...                   ########################################### [100%]
 1:MySQL-server           ########################################### [100%]
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
060920 14:40:53 /usr/sbin/mysqld: Shutdown Complete
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 swisspc password 'new-password'
See the manual for more instructions.
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 https://order.mysql.com
完了
[root@swisspc root]#

[root@swisspc root]# apt-get install MySQL-server MySQL-Max MySQL-client MySQL-shared
パッケージリストを読みこんでいます... 完了
依存情報ツリーを作成しています... 完了
* MySQL-server は既に最新バージョンがインストールされています。
* MySQL-client は既に最新バージョンがインストールされています。
* MySQL-shared は既に最新バージョンがインストールされています。
以下のパッケージが新たにインストールされます:

 MySQL-Max

アップグレード: 0 個, 新規インストール: 1 個, 削除: 0 個, 保留: 0 個
1630kB のアーカイブを取得する必要があります。
展開後に 4284kB のディスク容量が追加消費されます。
取得:1 http://updates.vinelinux.org 3.2/i386/plus MySQL-Max 4.0.25-0vl0 [1630kB]
1630kB を 1s 秒で取得しました (1373kB/s)
変更を適用しています...
準備中... ########################################### [100%]

  1:MySQL-Max              ########################################### [100%]

Restarting mysqld.
完了
[root@swisspc root]#

[skier@swisspc skier]$ mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.0.25-Max

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select host,user,password from mysql.user;

  1. -----------+------+----------+
    hostuserpassword
  2. -----------+------+----------+
    localhostroot
    swisspcroot
    localhost
    swisspc
  3. -----------+------+----------+
    4 rows in set (0.00 sec)

mysql> delete from mysql.user where user='';
Query OK, 2 rows affected (0.00 sec)

mysql> select host,user,password from mysql.user;

  1. -----------+------+----------+
    hostuserpassword
  2. -----------+------+----------+
    localhostroot
    swisspcroot
  3. -----------+------+----------+
    2 rows in set (0.00 sec)

mysql> SET PASSWORD FOR root=PASSWORD('********');
Query OK, 0 rows affected (0.00 sec)

mysql> select host,user,password from mysql.user;

  1. -----------+------+------------------+
    hostuserpassword
  2. -----------+------+------------------+
    localhostroot5de3001b24070f38
    swisspcroot
  3. -----------+------+------------------+
    2 rows in set (0.00 sec)

mysql> quit
Bye
[skier@swisspc skier]$
[skier@swisspc skier]$ mysql -u root -h swisspc
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8 to server version: 4.0.25-Max

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SET PASSWORD FOR root=PASSWORD('********');
Query OK, 0 rows affected (0.00 sec)

mysql> select host,user,password from mysql.user;

  1. -----------+------+------------------+
    hostuserpassword
  2. -----------+------+------------------+
    localhostroot5de3001b24070f38
    swisspcroot01244c675f5f3848
  3. -----------+------+------------------+
    2 rows in set (0.00 sec)

mysql> quit
Bye
[skier@swisspc skier]$