$/etc/init.d/mysqldstartMySQL データベースを初期化中: Installing MySQL system tables...OKFilling help tables...OK...The latest information about MySQL is available on the web athttp://www.mysql.comSupport MySQL by buying support/licenses at http://shop.mysql.com [ OK ]MySQL を起動中: [ OK ]$mysql-urootWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 2Server version: 5.0.77 Source distributionType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>usemysqlReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql>setpasswordforroot@localhost=password('hogehoge');Query OK, 0 rows affected (0.01 sec)mysql>selectuser,hostfrommysql.user;+------+-------------------------------+| user | host |+------+-------------------------------+| root | 127.0.0.1 || | kvps-11-22-33-44.secure.ne.jp || root | kvps-11-22-33-44.secure.ne.jp || | localhost || root | localhost |+------+-------------------------------+5 rows in set (0.00 sec)mysql>deletefrommysql.userwhereuser='';Query OK, 2 rows affected (0.00 sec)mysql> insert into user set user="hoge", password=password("hogehoge"), host="localhost";Query OK, 1 row affected, 3 warnings (0.00 sec)mysql>selectuser,hostfrommysql.user;+------+-------------------------------+| user | host |+------+-------------------------------+| root | 127.0.0.1 || root | kvps-11-22-33-44.secure.ne.jp || hoge | localhost || root | localhost |+------+-------------------------------+4 rows in set (0.00 sec)mysql>showdatabases;+--------------------+| Database |+--------------------+| information_schema || mysql || test |+--------------------+3 rows in set (0.00 sec)mysql>dropdatabasetest;Query OK, 0 rows affected (0.00 sec)mysql> create database hogedb;Query OK, 1 row affected (0.00 sec)mysql>grantallonhogedb.*tohoge;Query OK, 0 rows affected (0.00 sec)mysql>flushprivileges;Query OK, 0 rows affected (0.00 sec)mysql>exitBye$mysql-uhoge-phogehoge-DhogedbWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 3Server version: 5.0.77 Source distributionType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>exitBye
コメントを投稿 :