??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久国产亚洲精品,亚洲av午夜成人片精品网站,亚洲日韩精品一区二区三区无码http://m.tkk7.com/dashi99/category/37394.html<div align="center"> <img height="50" width="200" name="welcome" src="http://m.tkk7.com/images/blogjava_net/majianan/14891/r_5858488902000cu2.gif"/> </div> <br/> <center><font size=4 >鱼离不开?但是没有说不d哪滴?</font></center>zh-cnWed, 15 Aug 2012 08:57:31 GMTWed, 15 Aug 2012 08:57:31 GMT60How to insert multiple record into DB with store procedure?http://m.tkk7.com/dashi99/archive/2012/08/13/385403.htmlゞ沉默是金ゞゞ沉默是金ゞMon, 13 Aug 2012 08:17:00 GMThttp://m.tkk7.com/dashi99/archive/2012/08/13/385403.htmlhttp://m.tkk7.com/dashi99/comments/385403.htmlhttp://m.tkk7.com/dashi99/archive/2012/08/13/385403.html#Feedback0http://m.tkk7.com/dashi99/comments/commentRss/385403.htmlhttp://m.tkk7.com/dashi99/services/trackbacks/385403.html

1.        1.Define the object type PROFILE_TAG_TYPE.

CREATE OR REPLACE TYPE PZN_ADMIN.PROFILE_TAG_TYPE

AS

 OBJECT

 (

    MID                     VARCHAR2 (34),

    TAG_ID                  NUMBER,

    CUSTOMER_TYPE           VARCHAR2(1),

    SOURCE_SYSTEM           VARCHAR2(30),

    TAG_CREATED_DATE        VARCHAR2(30),

    INTEREST_LEVEL          NUMBER(2),

    SUPPRESSION_IND         VARCHAR2(2),

    SUPPRESSION_EXPIRY_DATE VARCHAR2(30),

    LAST_HOUSEKEEPING_DATE VARCHAR2(30),

    LAST_EVENT_DATE         VARCHAR2(30),

REASON                  VARCHAR2(1500) );

 

2.       2. Grant PROFILE_TAG_TYPE execute access to PZN_MB_USER.

GRANT EXECUTE ON PZN_ADMIN.PROFILE_TAG_TYPE TO PZN_MB_USER;

 

3.       3. Define the array type reference to object PROFILE_TAG_TYPE.

CREATE TYPE PZN_ADMIN.PROFILE_TAG_ARRAY AS TABLE OF PZN_ADMIN.PROFILE_TAG_TYPE;

 

4.       4. Grant PROFILE_TAG_ARRAY execute access to PZN_MB_USER.

GRANT EXECUTE ON PZN_ADMIN.PROFILE_TAG_ARRAY TO PZN_MB_USER;

 

5.       5. Create store procedure package.

CREATE OR REPLACE

PACKAGE PZN_ADMIN.PZN_PROFILE_TAG_PKG

AS

PROCEDURE INSERT_PROFILE_TAG(

    PTA PROFILE_TAG_ARRAY);

END PZN_PROFILE_TAG_PKG;

 

6.       6. Create store procedure package body.

CREATE OR REPLACE

PACKAGE BODY PZN_ADMIN.PZN_PROFILE_TAG_PKG

AS

PROCEDURE INSERT_PROFILE_TAG(

    PTA PROFILE_TAG_ARRAY)

AS

BEGIN

 FOR I IN PTA.FIRST..PTA.LAST

 LOOP

    INSERT

    INTO PZN_ADMIN.PROFILE_TAG

      (

        PROFILE_TAG_ID,

        MID,

        TAG_ID,

        CUSTOMER_TYPE,

        SOURCE_SYSTEM,

        TAG_CREATED_DATE,

        INTEREST_LEVEL,

        SUPPRESSION_IND,

        SUPPRESSION_EXPIRY_DATE,

        LAST_HOUSEKEEPING_DATE,

        LAST_EVENT_DATE,

        REASON

      )

      VALUES

      (

        SEQ_PROFILE_TAG_ID.NEXTVAL ,

        PTA(I).MID,

        PTA(I).TAG_ID,

        PTA(I).CUSTOMER_TYPE,

        PTA(I).SOURCE_SYSTEM,

        TO_DATE(PTA(I).TAG_CREATED_DATE,'YYYY-MM-DD'),

        PTA(I).INTEREST_LEVEL,

        PTA(I).SUPPRESSION_IND,

        TO_DATE(PTA(I).SUPPRESSION_EXPIRY_DATE,'YYYY-MM-DD'),

        TO_DATE(PTA(I).LAST_HOUSEKEEPING_DATE,'YYYY-MM-DD'),

        TO_DATE(PTA(I).LAST_EVENT_DATE,'YYYY-MM-DD'),

        PTA(I).REASON

      );

 END LOOP;

END INSERT_PROFILE_TAG;

END PZN_PROFILE_TAG_PKG;

 

7.       7. Create synonym to PZN_MB_USER.

CREATE SYNONYM PZN_MB_USER.PZN_PROFILE_TAG_PKG FOR PZN_ADMIN.PZN_PROFILE_TAG_PKG;

 

8.       8. Grant execute access to PZN_MB_USER.

GRANT EXECUTE ON PZN_ADMIN.PZN_PROFILE_TAG_PKG TO PZN_MB_USER;

 

9.       9. Create the java class to call the procedure.

 

public class ProcedureTest2 {

 

        public static void insertProfileTag(){

                        Connection dbConn = null;

                        try {

                                        Object[] so1 = {"ee745b5782bfc311e0b5730a2aba15aa77",31,"C","eDB","2012-08-13",0,"0","2012-08-13","2012-08-13","2012-08-13","eDB"};

                                        Object[] so2 = {"ee745b5782bfc311e0b5730a2aba15aa77",32,"C","eDB","2012-08-13",0,"0","2012-08-13","2012-08-13","2012-08-13","eDB"};

                                        OracleCallableStatement callStatement = null;

                                        Class.forName("oracle.jdbc.driver.OracleDriver");

                                        dbConn = DriverManager.getConnection("jdbc:oracle:thin:@da957116.fmr.com:1521:orcl", "PZN_MB_USER", "PZN_MB_USER123");

                                       

                                        StructDescriptor st = new StructDescriptor("PZN_ADMIN.PROFILE_TAG_TYPE", dbConn);

                                        STRUCT s1 = new STRUCT(st, dbConn, so1);

                                        STRUCT s2 = new STRUCT(st, dbConn, so2);

                                        STRUCT[] deptArray = { s1, s2 };

                                       

                                        ArrayDescriptor arrayDept = ArrayDescriptor.createDescriptor("PZN_ADMIN.PROFILE_TAG_ARRAY", dbConn);

                                        ARRAY deptArrayObject = new ARRAY(arrayDept, dbConn, deptArray);

                                       

                                        callStatement = (OracleCallableStatement) dbConn.prepareCall("{call PZN_PROFILE_TAG_PKG.INSERT_PROFILE_TAG(?)}");

                                        callStatement.setArray(1, deptArrayObject);

                                        callStatement.executeUpdate();

                                        dbConn.commit();

                                        callStatement.close();

                        } catch (Exception e) {

                                        System.out.println(e.toString());

                                        e.printStackTrace();

                        }

        }

 

        public static void main(String[] args) {

                        insertProfileTag();

        }

}



ゞ沉默是金ゞ 2012-08-13 16:17 发表评论
]]>
DML、DDL、DCL区别 .http://m.tkk7.com/dashi99/archive/2012/07/17/383307.htmlゞ沉默是金ゞゞ沉默是金ゞTue, 17 Jul 2012 06:25:00 GMThttp://m.tkk7.com/dashi99/archive/2012/07/17/383307.htmlhttp://m.tkk7.com/dashi99/comments/383307.htmlhttp://m.tkk7.com/dashi99/archive/2012/07/17/383307.html#Feedback0http://m.tkk7.com/dashi99/comments/commentRss/383307.htmlhttp://m.tkk7.com/dashi99/services/trackbacks/383307.htmlM解释Q?br />DMLQdata manipulation languageQ:
       它们是SELECT、UPDATE、INSERT、DELETEQ就象它的名字一Pq?条命令是用来Ҏ据库里的数据q行操作的语a
DDLQdata definition languageQ:
       DDL比DML要多Q主要的命o有CREATE、ALTER、DROP{,DDL主要是用在定义或改变表(TABLEQ的l构Q数据类型,表之间的链接和约束等初始化工作上Q他们大多在建立表时使用
DCLQData Control LanguageQ:
       是数据库控制功能。是用来讄或更Ҏ据库用户或角色权限的语句Q包括(grant,deny,revoke{)语句。在默认状态下Q只有sysadmin,dbcreator,db_owner或db_securityadmin{h员才有权力执行DCL

详细解释Q?br />一、DDL is Data Definition Language statements. Some examples:数据定义语言Q用于定义和理 SQL 数据库中的所有对象的语言
      1.CREATE - to create objects in the database   创徏
      2.ALTER - alters the structure of the database   修改
      3.DROP - delete objects from the database   删除
      4.TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
      TRUNCATE TABLE [Table Name]?
  下面是对Truncate语句在MSSQLServer2000中用法和原理的说明:
  Truncate table 表名 速度?而且效率?因ؓ:
  TRUNCATE TABLE 在功能上与不?WHERE 子句?DELETE 语句相同Q二者均删除表中的全部行。但 TRUNCATE TABLE ?DELETE 速度快,且用的pȝ和事务日志资源少?
  DELETE 语句每次删除一行,q在事务日志中ؓ所删除的每行记录一VTRUNCATE TABLE 通过释放存储表数据所用的数据|删除数据Qƈ且只在事务日志中记录늚释放?
  TRUNCATE TABLE 删除表中的所有行Q但表结构及其列、约束、烦引等保持不变。新行标识所用的计数值重|ؓ该列的种子。如果想保留标识计数|h?DELETE。如果要删除表定义及其数据,请?DROP TABLE 语句?
  对于?FOREIGN KEY U束引用的表Q不能?TRUNCATE TABLEQ而应使用不带 WHERE 子句?DELETE 语句。由?TRUNCATE TABLE 不记录在日志中,所以它不能Ȁz触发器?
  TRUNCATE TABLE 不能用于参与了烦引视囄表?
       5.COMMENT - add comments to the data dictionary 注释
       6.GRANT - gives user's access privileges to database 授权
       7.REVOKE - withdraw access privileges given with the GRANT command   收回已经授予的权?/p>

二、DML is Data Manipulation Language statements. Some examples:数据操作语言QSQL中处理数据等操作l称为数据操U语a
       1.SELECT - retrieve data from the a database           查询
       2.INSERT - insert data into a table                    d
        3.UPDATE - updates existing data within a table    更新
       4.DELETE - deletes all records from a table, the space for the records remain   删除
       5.CALL - call a PL/SQL or Java subprogram
       6.EXPLAIN PLAN - explain access path to data
       Oracle RDBMS执行每一条SQL语句Q都必须l过Oracle优化器的评估。所以,了解优化器是如何选择(搜烦)路径以及索引是如何被使用的,对优化SQL语句有很大的帮助。Explain可以用来q速方便地查出对于l定SQL语句中的查询数据是如何得到的x索\?我们通常UCؓAccess Path)。从而我们选择最优的查询方式辑ֈ最大的优化效果?
       7.LOCK TABLE - control concurrency 锁,用于控制q发

三、DCL is Data Control Language statements. Some examples:数据控制语言Q用来授予或回收讉K数据库的某种ҎQƈ控制数据库操U事务发生的旉及效果,Ҏ据库实行监视{?
       1.COMMIT - save work done 提交
        2.SAVEPOINT - identify a point in a transaction to which you can later roll back 保存?
       3.ROLLBACK - restore database to original since the last COMMIT   回滚
       4.SET TRANSACTION - Change transaction options like what rollback segment to use   讄当前事务的特性,它对后面的事务没有媄响.



ゞ沉默是金ゞ 2012-07-17 14:25 发表评论
]]>
SET DEFINE OFFhttp://m.tkk7.com/dashi99/archive/2012/07/17/383306.htmlゞ沉默是金ゞゞ沉默是金ゞTue, 17 Jul 2012 06:22:00 GMThttp://m.tkk7.com/dashi99/archive/2012/07/17/383306.htmlhttp://m.tkk7.com/dashi99/comments/383306.htmlhttp://m.tkk7.com/dashi99/archive/2012/07/17/383306.html#Feedback0http://m.tkk7.com/dashi99/comments/commentRss/383306.htmlhttp://m.tkk7.com/dashi99/services/trackbacks/383306.htmlset define off 则关闭该功能Q?#8220;&”作为普通字W,如上例,最l字W就?#8220;SQL&Plus”
set define off关闭替代变量功能
set define on 开启替代变量功?
set define *  默认替代变量标志符该ؓ“*”(也可以设为其它字W?

Example:
SET DEFINE OFF
BEGIN
UPDATE ADMIN.TAG
   SET TYPE_ID = 2,
       SUBCATEGORY_ID = 10,
       UPDATED_BY = 'A&B',
       CREATED_BY = 'A&B',
       CREATED_DATE = SYSDATE,
       UPDATED_DATE = SYSDATE
 WHERE TAG_ID = 2;
END;
/



ゞ沉默是金ゞ 2012-07-17 14:22 发表评论
]]>
Difference between TRUNCATE, DELETE and DROP commandshttp://m.tkk7.com/dashi99/archive/2012/07/12/382884.htmlゞ沉默是金ゞゞ沉默是金ゞThu, 12 Jul 2012 07:30:00 GMThttp://m.tkk7.com/dashi99/archive/2012/07/12/382884.htmlhttp://m.tkk7.com/dashi99/comments/382884.htmlhttp://m.tkk7.com/dashi99/archive/2012/07/12/382884.html#Feedback0http://m.tkk7.com/dashi99/comments/commentRss/382884.htmlhttp://m.tkk7.com/dashi99/services/trackbacks/382884.htmlDELETE

 

The DELETE command is used to remove rows from a table. A WHERE clause can be used to only remove some rows. If no WHERE condition is specified, all rows will be removed. After performing a DELETE operation you need to COMMIT or ROLLBACK the transaction to make the change permanent or to undo it. Note that this operation will cause all DELETE triggers on the table to fire.

SQL> SELECT COUNT(*FROM emp;

  
COUNT(*)
----------
        14

SQL
> DELETE FROM emp WHERE job = 'CLERK';

4 rows deleted.

SQL
> COMMIT;

Commit complete.

SQL
> SELECT COUNT(*FROM emp;

  
COUNT(*)
----------
        10

TRUNCATE

 

TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE.

SQL> TRUNCATE TABLE emp;

Table truncated.

SQL
> SELECT COUNT(*FROM emp;

  
COUNT(*)
----------
         0

DROP

 

The DROP command removes a table from the database. All the tables' rows, indexes and privileges will also be removed. No DML triggers will be fired. The operation cannot be rolled back.

SQL> DROP TABLE emp;

Table dropped.

SQL
> SELECT * FROM emp;
SELECT * FROM emp
              
*
ERROR at line 
1:
ORA
-00942table or view does not exist
DROP and TRUNCATE are DDL commands, whereas DELETE is a DML command. Therefore DELETE operations can be rolled back (undone), while DROP and TRUNCATE operations cannot be rolled back.

 

From Oracle 10g a table can be "undropped". Example:

 

SQL> FLASHBACK TABLE emp TO BEFORE DROP;

Flashback complete.

 

PS: DROP and TRUNCATE are DDL commands, whereas DELETE is a DML command. As such, DELETE operations can be rolled back (undone), while DROP and TRUNCATE operations cannot be rolled back.


1>TRUNCATE is a DDL command whereas DELETE is a DML command.

2>TRUNCATE is much faster than DELETE.

Reason:When you type DELETE.all the data get copied into the Rollback Tablespace first.then delete operation get performed.Thatswhy when you type ROLLBACK after deleting a table ,you can get back the data(The system get it for you from the Rollback Tablespace).All this process take time.But when you type TRUNCATE,it removes data directly without copying it into the Rollback Tablespace.Thatswhy TRUNCATE is faster.Once you Truncate you cann't get back the data.

3>You cann't rollback in TRUNCATE but in DELETE you can rollback.TRUNCATE removes the record permanently.

4>In case of TRUNCATE ,Trigger doesn't get fired.But in DML commands like DELETE .Trigger get fired.

5>You cann't use conditions(WHERE clause) in TRUNCATE.But in DELETE you can write conditions using WHERE clause
6>TRUNCATE command resets the High Water Mark for the table but DELETE does not. So after TRUNCATE the operations on table are much faster.



ゞ沉默是金ゞ 2012-07-12 15:30 发表评论
]]>
SQL SERVER 2005 如何启动服务?http://m.tkk7.com/dashi99/archive/2009/12/04/304794.htmlゞ沉默是金ゞゞ沉默是金ゞFri, 04 Dec 2009 09:05:00 GMThttp://m.tkk7.com/dashi99/archive/2009/12/04/304794.htmlhttp://m.tkk7.com/dashi99/comments/304794.htmlhttp://m.tkk7.com/dashi99/archive/2009/12/04/304794.html#Feedback1http://m.tkk7.com/dashi99/comments/commentRss/304794.htmlhttp://m.tkk7.com/dashi99/services/trackbacks/304794.html1.「开始」菜?>q行

--启动sql server 2005 服务
net start mssqlserver

--停止sql server 2005 服务
net stop mssqlserver

2.「开始」菜?>E序->Microsoft SQL Server 2005->配置工具
SQL Server Configuration Manager->SQL Server(MSSQLSERVER) 叛_ 启动服务成功后,状态显CZؓ“正在q行”

3.「开始」菜?>q行->services.msc 服务控制?br /> SQL Server(MSSQLSERVER) 叛_ 启动成功后,状态显CZؓ“已启?#8221;

注意Q关?433端口问题Q?br />       在安装SQL SERVER 2005的时候默认没有启动TCP/IP?433端口Q我们可以在SQL Server Configuration Manager
->SQL Native Client 配置->客户端协?下将Tcp/IP?433端口开通?

ゞ沉默是金ゞ 2009-12-04 17:05 发表评论
]]>
can not be represented as java.sql.Timestamphttp://m.tkk7.com/dashi99/archive/2009/06/20/283355.htmlゞ沉默是金ゞゞ沉默是金ゞSat, 20 Jun 2009 07:20:00 GMThttp://m.tkk7.com/dashi99/archive/2009/06/20/283355.htmlhttp://m.tkk7.com/dashi99/comments/283355.htmlhttp://m.tkk7.com/dashi99/archive/2009/06/20/283355.html#Feedback0http://m.tkk7.com/dashi99/comments/commentRss/283355.htmlhttp://m.tkk7.com/dashi99/services/trackbacks/283355.html使用hibernate开发程序的时候,有的旉字段没有必要填写Q但是,以后hibernate查询的时候会报出

java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Timestamp

的错误, q是因ؓhibernate认ؓq个不是一个有效的旉字串?

而有效的日期格式?#8220; 0001-01-01   00:00:00.0 ”


查看了mysql5的帮助文对于datetime的解释如?/p>

Datetimes with all-zero components (0000-00-00 ...) ?These values can not be represented 关于所有Datetimecd?l成的数据,q些g能在java中被可靠的表C?br /> reliably in Java.
Connector/J 3.0.x always converted them to NULL when being read from a ResultSet.
当这些值正在从ResultSet容器中读取时候,Connector/J 3.0.x 一直把他们转换为NULL倹{?/p>

Connector/J 3.1 throws an exception by default when these values are encountered as this is the most correct behavior according to the JDBC and SQL standards.
依照JDBC和SQL的标准这些值碰到的最正确的处理方式就是在~省情况下生异?br /> This behavior can be modified using the zeroDateTimeBehavior configuration property. The allowable values are:
JDBC允许用下列的值对zeroDateTimeBehavior 属性来讄q些处理方式Q?/p>

exception (the default), which throws an SQLException with an SQLState of S1009.
讄为exception 异常Q缺省)用一个SQLState的s1009错误h抛出一个异?br /> convertToNull, which returns NULL instead of the date.
讄为convertToNullQ用NULL值来代替q个日期cd
round, which rounds the date to the nearest closest value which is 0001-01-01.
讄为roundQ则围绕q个日期最接近的|0001-01-01Q来代替

 

修改你的jdbcq接

jdbc:mysql://localhost/schoolmis?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull



ゞ沉默是金ゞ 2009-06-20 15:20 发表评论
]]>
无法q程dMySQL Server解决http://m.tkk7.com/dashi99/archive/2009/02/03/253051.htmlゞ沉默是金ゞゞ沉默是金ゞTue, 03 Feb 2009 03:26:00 GMThttp://m.tkk7.com/dashi99/archive/2009/02/03/253051.htmlhttp://m.tkk7.com/dashi99/comments/253051.htmlhttp://m.tkk7.com/dashi99/archive/2009/02/03/253051.html#Feedback0http://m.tkk7.com/dashi99/comments/commentRss/253051.htmlhttp://m.tkk7.com/dashi99/services/trackbacks/253051.html  q个是因为权限的问题Q处理方式如下: 
  shell>mysql --user=root -p 
  输入密码 
  mysql>use mysql 
  mysql>GRANT SELECT,INSERT,UPDATE,DELETE ON [db_name].* TO [username]@[ipadd] identified by ’[password]’; 

  [username]:q程d的用者代?nbsp;
  Qdb_name]:表示Ʋ开攄使用者的数据库称 
  [password]:q程d的用者密?nbsp;
  [ipadd]:IP地址或者IP反查后的DNS NameQ此例的内容需填入’60-248-32-13.HINET-IP.hinet.net’ Q包函上引号(’) 

  Q其实就是在q端服务?/a>上执行,地址填写本地L的ip地址。) 

  如果希望开放所有权限的话请执行Q?nbsp;
  mysql>update user set select_priv=’Y’ , Insert_priv=’Y’, Update_priv=’Y’, delete_priv=’Y’, Create_priv=’Y’, Drop_priv=’Y’,Reload_priv=’Y’, shutdown_priv=’Y’, Process_priv=’Y’, File_priv=’Y’, Grant_priv=’Y’, references_priv=’Y’,Index_priv=’Y’, Alter_priv=’Y’, Show_db_priv=’Y’, Super_priv=’Y’,Create_tmp_table_priv=’Y’,Lock_tables_priv=’Y’, Execute_priv=’Y’,Repl_slave_priv=’Y’,Repl_client_priv=’Y’ where user=’[username]’; 

  如何解决客户端与服务器端的连?mysql) Qxxx.xxx.xxx.xxx is not allowed to connect to this mysql serv  

  q两天搞MySQL,遇到一些问题,怕忘掉,放上来,留着备用 

  q个Ҏ是在google上搜出来的,不过他是转自CSDNQ^_^ 

  1、进入mysqlQ创Z个新用户xuysQ?nbsp;
   格式Qgrant 权限 on 数据库名.表名 用户@dL identified by "用户密码"; 
   grant select,update,insert,delete on *.* to xuys@192.168.88.234 identified by "xuys1234"; 
     查看l果Q执行: 
     use mysql; 
     select host,user,password from user; 
     可以看到在user表中已有刚才创徏的xuys用户。host字段表示d的主机,其值可以用IPQ也可用L名, 
     host字段的值改?pC在M客户端机器上能以xuys用户d到mysql服务器,在开发时设ؓ%?nbsp;
     update user set host = ’%’ where user = ’xuys’; 
  2?./mysqladmin -uroot -p21century reload 
   ./mysqladmin -uroot -p21century shutdown 
  3?/mysqld_safe --user-root & 
  CQ对授权表的M修改都需要重新reloadQ即执行W?步?nbsp;

  如果l过以上3个步骤还是无法从客户端连接,h行以下操作,在mysql数据库的db表中插入一条记录: 
  use mysql; 
  insert into db values(’192.168.88.234’,’%’,’xuys’,’Y’,’Y’,’Y’,’Y’,’Y’,’Y’,’Y’,’Y’,’Y’,’Y’,’Y’,’Y’); 
  update db set host = ’%’ where user = ’xuys’; 
  重复执行上面的第2?步?/p>

ゞ沉默是金ゞ 2009-02-03 11:26 发表评论
]]>
MYSQL q接数据库命令收?/title><link>http://m.tkk7.com/dashi99/archive/2009/02/03/253038.html</link><dc:creator>ゞ沉默是金ゞ</dc:creator><author>ゞ沉默是金ゞ</author><pubDate>Tue, 03 Feb 2009 02:47:00 GMT</pubDate><guid>http://m.tkk7.com/dashi99/archive/2009/02/03/253038.html</guid><wfw:comment>http://m.tkk7.com/dashi99/comments/253038.html</wfw:comment><comments>http://m.tkk7.com/dashi99/archive/2009/02/03/253038.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.tkk7.com/dashi99/comments/commentRss/253038.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/dashi99/services/trackbacks/253038.html</trackback:ping><description><![CDATA[<div id="oeq62yq" class="cnt" id="blog_text"> <p>一、MySQL q接本地数据库,用户名ؓ“root”Q密?#8220;123”Q注意:“-p”?#8220;123” 之间不能有空|</p> <pre class="cmdcode">C:\>mysql -h localhost -u root -p123</pre> <p>二、MySQL q接q程数据库(192.168.0.201Q,端口“3306”Q用户名?#8220;root”Q密?#8220;123”</p> <pre class="cmdcode">C:\>mysql -h 172.16.16.45 -P 3306 -u root -p123</pre> <p>三、MySQL q接本地数据库,用户名ؓ“root”Q隐藏密?/p> <pre class="cmdcode">C:\>mysql -h localhost -u root -p<br /> Enter password:</pre> <p>四、MySQL q接本地数据库,用户名ؓ“root”Q指定所q接的数据库?#8220;test”</p> <pre class="cmdcode">C:\>mysql -h localhost -u root -p123 -D test<br /> mysql>select database();<br /> +------------+<br /> | database() |<br /> +------------+<br /> | test |<br /> +------------+</pre> <p>下面?MySQL 客户端命令的详细参数Q?/p> <pre class="cmdcode">mysql Ver 14.12 Distrib 5.0.41, for Win32 (ia32)<br /> Copyright (C) 2002 MySQL AB<br /> This software comes with ABSOLUTELY NO WARRANTY. This is free software,<br /> and you are welcome to modify and redistribute it under the GPL license<br /> <br /> Usage: mysql [OPTIONS] [database]<br /> -?, --help Display this help and exit.<br /> -I, --help Synonym for -?<br /> --auto-rehash Enable automatic rehashing. One doesn't need to use<br /> 'rehash' to get table and field completion, but startup<br /> and reconnecting may take a longer time. Disable with<br /> --disable-auto-rehash.<br /> -A, --no-auto-rehash <br /> No automatic rehashing. One has to use 'rehash' to get<br /> table and field completion. This gives a quicker start of<br /> mysql and disables rehashing on reconnect. WARNING:<br /> options deprecated; use --disable-auto-rehash instead.<br /> -B, --batch Don't use history file. Disable interactive behavior.<br /> (Enables --silent)<br /> --character-sets-dir=name <br /> Directory where character sets are.<br /> --default-character-set=name <br /> Set the default character set.<br /> -C, --compress Use compression in server/client protocol.<br /> -#, --debug[=#] This is a non-debug version. Catch this and exit<br /> -D, --database=name Database to use.<br /> --delimiter=name Delimiter to be used.<br /> -e, --execute=name Execute command and quit. (Disables --force and history<br /> file)<br /> -E, --vertical Print the output of a query (rows) vertically.<br /> -f, --force Continue even if we get an sql error.<br /> -G, --named-commands <br /> Enable named commands. Named commands mean this program's<br /> internal commands; see mysql> help . When enabled, the<br /> named commands can be used from any line of the query,<br /> otherwise only from the first line, before an enter.<br /> Disable with --disable-named-commands. This option is<br /> disabled by default.<br /> -g, --no-named-commands <br /> Named commands are disabled. Use \* form only, or use<br /> named commands only in the beginning of a line ending<br /> with a semicolon (;) Since version 10.9 the client now<br /> starts with this option ENABLED by default! Disable with<br /> '-G'. Long format commands still work from the first<br /> line. WARNING: option deprecated; use<br /> --disable-named-commands instead.<br /> -i, --ignore-spaces Ignore space after function names.<br /> --local-infile Enable/disable LOAD DATA LOCAL INFILE.<br /> -b, --no-beep Turn off beep on error.<br /> -h, --host=name Connect to host.<br /> -H, --html Produce HTML output.<br /> -X, --xml Produce XML output<br /> --line-numbers Write line numbers for errors.<br /> -L, --skip-line-numbers <br /> Don't write line number for errors. WARNING: -L is<br /> deprecated, use long version of this option instead.<br /> -n, --unbuffered Flush buffer after each query.<br /> --column-names Write column names in results.<br /> -N, --skip-column-names <br /> Don't write column names in results. WARNING: -N is<br /> deprecated, use long version of this options instead.<br /> -O, --set-variable=name <br /> Change the value of a variable. Please note that this<br /> option is deprecated; you can set variables directly with<br /> --variable-name=value.<br /> --sigint-ignore Ignore SIGINT (CTRL-C)<br /> -o, --one-database Only update the default database. This is useful for<br /> skipping updates to other database in the update log.<br /> -p, --password[=name] <br /> Password to use when connecting to server. If password is<br /> not given it's asked from the tty.<br /> -W, --pipe Use named pipes to connect to server.<br /> -P, --port=# Port number to use for connection.<br /> --prompt=name Set the mysql prompt to this value.<br /> --protocol=name The protocol of connection (tcp,socket,pipe,memory).<br /> -q, --quick Don't cache result, print it row by row. This may slow<br /> down the server if the output is suspended. Doesn't use<br /> history file.<br /> -r, --raw Write fields without conversion. Used with --batch.<br /> --reconnect Reconnect if the connection is lost. Disable with<br /> --disable-reconnect. This option is enabled by default.<br /> -s, --silent Be more silent. Print results with a tab as separator,<br /> each row on new line.<br /> --shared-memory-base-name=name <br /> Base name of shared memory.<br /> -S, --socket=name Socket file to use for connection.<br /> --ssl Enable SSL for connection (automatically enabled with<br /> other flags). Disable with --skip-ssl.<br /> --ssl-ca=name CA file in PEM format (check OpenSSL docs, implies<br /> --ssl).<br /> --ssl-capath=name CA directory (check OpenSSL docs, implies --ssl).<br /> --ssl-cert=name X509 cert in PEM format (implies --ssl).<br /> --ssl-cipher=name SSL cipher to use (implies --ssl).<br /> --ssl-key=name X509 key in PEM format (implies --ssl).<br /> --ssl-verify-server-cert <br /> Verify server's "Common Name" in its cert against<br /> hostname used when connecting. This option is disabled by<br /> default.<br /> -t, --table Output in table format.<br /> -T, --debug-info Print some debug info at exit.<br /> --tee=name Append everything into outfile. See interactive help (\h)<br /> also. Does not work in batch mode. Disable with<br /> --disable-tee. This option is disabled by default.<br /> --no-tee Disable outfile. See interactive help (\h) also. WARNING:<br /> option deprecated; use --disable-tee instead<br /> -u, --user=name User for login if not current user.<br /> -U, --safe-updates Only allow UPDATE and DELETE that uses keys.<br /> -U, --i-am-a-dummy Synonym for option --safe-updates, -U.<br /> -v, --verbose Write more. (-v -v -v gives the table output format).<br /> -V, --version Output version information and exit.<br /> -w, --wait Wait and retry if connection is down.<br /> --connect_timeout=# Number of seconds before connection timeout.<br /> --max_allowed_packet=# <br /> Max packet length to send to, or receive from server<br /> --net_buffer_length=# <br /> Buffer for TCP/IP and socket communication<br /> --select_limit=# Automatic limit for SELECT when using --safe-updates<br /> --max_join_size=# Automatic limit for rows in a join when using<br /> --safe-updates<br /> --secure-auth Refuse client connecting to server if it uses old<br /> (pre-4.1.1) protocol<br /> --show-warnings Show warnings after every statement.<br /> <br /> Default options are read from the following files in the given order:<br /> C:\my.ini C:\my.cnf C:\WINDOWS\my.ini C:\WINDOWS\my.cnf D:\MySQL\my.ini D:\MySQL\my.cnf <br /> The following groups are read: mysql client<br /> The following options may be given as the first argument:<br /> --print-defaults Print the program argument list and exit<br /> --no-defaults Do not read default options from any options file<br /> --defaults-file=# Only read default options from the given file #<br /> --defaults-extra-file=# Read this file after the global files are read<br /> <br /> Variables (--variable-name=value)<br /> and boolean options {FALSE|TRUE} Value (after reading options)<br /> --------------------------------- -----------------------------<br /> auto-rehash TRUE<br /> character-sets-dir (No default value)<br /> default-character-set utf8<br /> compress FALSE<br /> database (No default value)<br /> delimiter ;<br /> vertical FALSE<br /> force FALSE<br /> named-commands FALSE<br /> local-infile FALSE<br /> no-beep FALSE<br /> host (No default value)<br /> html FALSE<br /> xml FALSE<br /> line-numbers TRUE<br /> unbuffered FALSE<br /> column-names TRUE<br /> sigint-ignore FALSE<br /> port 3306<br /> prompt mysql> <br /> quick FALSE<br /> raw FALSE<br /> reconnect TRUE<br /> shared-memory-base-name (No default value)<br /> socket (No default value)<br /> ssl FALSE<br /> ssl-ca (No default value)<br /> ssl-capath (No default value)<br /> ssl-cert (No default value)<br /> ssl-cipher (No default value)<br /> ssl-key (No default value)<br /> ssl-verify-server-cert FALSE<br /> table FALSE<br /> debug-info FALSE<br /> user (No default value)<br /> safe-updates FALSE<br /> i-am-a-dummy FALSE<br /> connect_timeout 0<br /> max_allowed_packet 16777216<br /> net_buffer_length 16384<br /> select_limit 1000<br /> max_join_size 1000000<br /> secure-auth FALSE<br /> show-warnings FALSE</pre> </div> <img src ="http://m.tkk7.com/dashi99/aggbug/253038.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/dashi99/" target="_blank">ゞ沉默是金ゞ</a> 2009-02-03 10:47 <a href="http://m.tkk7.com/dashi99/archive/2009/02/03/253038.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> վ֩ģ壺 <a href="http://xixidhw.com" target="_blank">鶹VAѾƷ</a>| <a href="http://dangyuming.com" target="_blank">߿Ƭ˳Ӿ</a>| <a href="http://www-ttyx.com" target="_blank">޾Ʒһ</a>| <a href="http://vvww-3499.com" target="_blank">þþƷAV鶹</a>| <a href="http://wilbysec.com" target="_blank">ˬִ̼վ</a>| <a href="http://junfurui.com" target="_blank">av뾫Ʒ</a>| <a href="http://ddtase.com" target="_blank">aëƬƵ</a>| <a href="http://gangxiangli.com" target="_blank">A޾Ʒ</a>| <a href="http://bjsunic.com" target="_blank">91վ߹ۿ</a>| <a href="http://3baimm.com" target="_blank">ղϵ</a>| <a href="http://zjj100.com" target="_blank">Ůcaoվѿ߿</a>| <a href="http://fsdyzs.com" target="_blank">A޾VƷ</a>| <a href="http://benjiebf.com" target="_blank">պ뾫Ʒþһ</a>| <a href="http://chiguigu.com" target="_blank">þѾƷav</a>| <a href="http://jpvv8.com" target="_blank">ëƬȫ</a>| <a href="http://www678678.com" target="_blank">˳ѹۿ</a>| <a href="http://yijiazhiwei.com" target="_blank">ˬָ߳ëƬ</a>| <a href="http://www66913.com" target="_blank">avһ߲ </a>| <a href="http://hezuoedu.com" target="_blank">þþþùɫAVѹۿ</a>| <a href="http://pufenghotel.com" target="_blank">޾ƷƬþ</a>| <a href="http://c9133.com" target="_blank">þþþùƷѿ</a>| <a href="http://srvz83.com" target="_blank">һëƬ߹</a>| <a href="http://5d8f.com" target="_blank">պƵ</a>| <a href="http://xieehuomh.com" target="_blank">þþþþùaѹۿ</a>| <a href="http://fdsyjy.com" target="_blank">˳Ƶۿ</a>| <a href="http://655060.com" target="_blank">ԻȫƵվ </a>| <a href="http://jiucaoji.com" target="_blank">Ƶ߹ۿվ</a>| <a href="http://868664.com" target="_blank">ƹƵӰԺ߹ۿ</a>| <a href="http://avdaka.com" target="_blank">þ޾Ʒ߳ۺɫaƬ</a>| <a href="http://caoliusq1024.com" target="_blank">츾ٸ߹ۿ</a>| <a href="http://99880524.com" target="_blank">91Ʒѹ</a>| <a href="http://xtolm.com" target="_blank">avһ</a>| <a href="http://fshomppa.com" target="_blank">ֻӲˬƬ</a>| <a href="http://txtmp3.com" target="_blank">ҹžƵ߹ۿ</a>| <a href="http://bx85.com" target="_blank">ɫٸ߳18p</a>| <a href="http://sczxzt.com" target="_blank">ľƷAVƬ</a>| <a href="http://733807.com" target="_blank">޹Ʒѹۿ</a>| <a href="http://mangshigas.com" target="_blank">߹ۿһ</a>| <a href="http://zgbeian.com" target="_blank">լa</a>| <a href="http://shaolingtongluo.com" target="_blank">˳Ƶx8x8</a>| <a href="http://www-7479.com" target="_blank">51ƵƷȫ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>