MySQL インストール2013/05/12 |
データベースサーバーに MySQL をインストールします。 |
root@www:~#
aptitude -y install mysql-server-5.5 # インストール中、MySQL rootパスワードの設定を求められる +--------------------+ Configuring mysql-server-5.5 +---------------------+ | While not mandatory, it is highly recommended that you set a password | | for the MySQL administrative "root" user. | | | | If this field is left blank, the password will not be changed. | | | | New password for the MySQL "root" user: | | | | ************************************___________________________________ | | | | <Ok> | | | +-------------------------------------------------------------------------+root@www:~# mysql -u root -p # MySQLにログイン Enter password: # インストール中に設定したrootパスワード入力 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 42 Server version: 5.5.30-1.1 (Debian) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. # ユーザ情報表示 mysql> select user,host,password from mysql.user; +------------------+-----------+-------------------------------------------+ | user | host | password | +------------------+-----------+-------------------------------------------+ | root | localhost | *D1EEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | | root | www | *D1EEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | | root | 127.0.0.1 | *D1EEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | | root | ::1 | *D1EEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | | | localhost | | | | www | | | debian-sys-maint | localhost | *D1EEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | +------------------+-----------+-------------------------------------------+ 7 rows in set (0.00 sec) # 匿名ユーザを削除しておく mysql> delete from mysql.user where user=''; Query OK, 2 rows affected (0.00 sec) exit Bye |
Sponsored Link |