hns - 日記自動生成システム - Version 2.19.9

先月 2006年06月 来月
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2006年06月06日(火) 旧暦 [n年日記] [更新:"2006/06/10 11:02:29"]

#1 [MySQL][WordPress] (WordPress) blog をそっくり写したい

  1. apache 側の目録(diretory)を写す
    今回は WordPressme203 が出ていたので、それを使った。
  2. config.ph のデータべース名を変更
  3. 作った Web Page を開けて新規に blog を作るのと同じ設定をしておく。
  4. mysql 側に login
    ttyp2:makoto@st4200 8:46:21/060606(/tmp)> mysql -u username -p -h hostname databasename
    Enter password: 
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 3723 to server version: 4.1.11
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql> 
    
  5. show tables; で表の名前を確認
    mysql> show tables;
    +-----------------------+
    | Tables_in_wordpress   |
    +-----------------------+
    | db_categories         |
    | db_comments           |
    | db_linkcategories     |
    | db_links              |
    | db_options            |
    | db_post2cat           |
    | db_postmeta           |
    | db_posts              |
    | db_users              |
    +-----------------------+
    9 rows in set (0.00 sec)
    mysql> 
    
  6. SELECT * INTO OUTFILE 'filename' FROM table_name;
    
    を発行して 表毎に譜に書出す。 サーバ側から、読出を許可されていない場合、次のように言われる
    mysql> select * into outfile 'categories' from db_categories;
    ERROR 1045 (28000): Access denied for user
        'username'@'192.168.1.0/255.255.255.0' (using password: YES)
    
  7. 表の中で、既に登録されている id = 1 のものがあると、表から 書けないと言われるものがあるので、
    • 既に登録されている方を消す
    • 表の一つ目を編集して消しておく
    のどちらかの対処をしておく
  8. LOAD DATA INFILE 'filename' INTO table_name;
    
    を使って、filename から 表に読む。この時に、読まなくていい表もあるので、 一応大きさとか意味とかを少し考えて操作する。例えば links は(変更していなければ) 多分不要。

MySQL の管理項目:

MySQL は、自分のデータの管理に、mysql という名前のデータベースを作って、 それで管理している。こうすると、自分自身がこわれてしまった場合にはちょっと不便になって しまうが、 それさえなければ、SQL 文でも変更出来るので分りやすくていい。 その内容を見るには、次のようにする。
ttyp0:makoto@hostname 8:52:42/060606(~)> mysql -u root -p mysql
Enter password: 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3730 to server version: 4.1.11

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

mysql> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| func                      |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| host                      |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
15 rows in set (0.00 sec)

mysql> 
mysql> select * from user;
とすると、次のような項目が表示される。機械、利用者名、操作毎に許可 が設定してある
 Host                       
 User   
 Password                                  
 Select_priv 
 Insert_priv 
 Update_priv 
 Delete_priv 
 Create_priv 
 Drop_priv 
 Reload_priv 
 Shutdown_priv 
 Process_priv 
 File_priv 
 Grant_priv 
 References_priv 
 Index_priv 
 Alter_priv 
 Show_db_priv 
 Super_priv 
 Create_tmp_table_priv 
 Lock_tables_priv 
 Execute_priv 
 Repl_slave_priv 
 Repl_client_priv 
 ssl_type 
 ssl_cipher 
 x509_issuer 
 x509_subject 
 max_questions 
 max_updates 
 max_connections 
あるいは、次のようにすれば確認出来る
mysql> select host,user,select_priv,update_priv from user;
+----------------------------+--------+-------------+-------------+
| host                       | user   | select_priv | update_priv |
+----------------------------+--------+-------------+-------------+
| localhost                  | root   | Y           | Y           |
+----------------------------+--------+-------------+-------------+

#2 [NetBSD][macppc] ./build.sh release for 20060527

(for 3.99.20)
===> Successful make release
===> build.sh started: Tue Jun  6 00:06:19 JST 2006
===> build.sh ended:   Tue Jun  6 03:28:56 JST 2006
===> Summary of results:
         build.sh command: ./build.sh release
         build.sh started: Tue Jun  6 00:06:19 JST 2006
         No nonexistent/bin/nbmake, needs building.
         Bootstrapping nbmake
         MACHINE:          macppc
         MACHINE_ARCH:     powerpc
         TOOLDIR path:     /export/20060527/checkout/src/tooldir.NetBSD-3.99.11-powerpc
         DESTDIR path:     /export/20060527/checkout/src/destdir.macppc
         RELEASEDIR path:  /export/20060527/checkout/src/releasedir
         Created /export/20060527/checkout/src/tooldir.NetBSD-3.99.11-powerpc/bin/nbmake
         makewrapper:      /export/20060527/checkout/src/tooldir.NetBSD-3.99.11-powerpc/bin/nbmake-macppc
         Updated /export/20060527/checkout/src/tooldir.NetBSD-3.99.11-powerpc/bin/nbmake-macppc
         Successful make release
         build.sh started: Tue Jun  6 00:06:19 JST 2006
         build.sh ended:   Tue Jun  6 03:28:56 JST 2006
===> .
次のところに写しておく。



最近の日記
2024年05月08日
comparison on ./buildsh tools
2024年05月06日
py-setuptools (python 3.11.9)
make release took 1 hours and 10 min
qemu invocation for 10.99.10
2024年05月05日
Windows 10 version
serial connection
bc bench
2024年05月04日
Trial on 10.99.10
another version (later trial) to succeed
2024年04月29日
dkim
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)