MySQL 3回インポートエラー解決!

13870 ワード

エラー1、ERROR at line 16799:Unknown command''.
[root@xxxx ~]# mysql -u hyxd -p xxxx Enter password: 
ERROR at line 16779: Unknown command '\''.

エラーの原因:文字セットの問題
解決策:文字セットをutf-8に変更
エラー2、ERROR 2006(HY 000)at line 11903:MySQL server has gone away
[root@xxxx ~]# mysql -uhyxd -p xedk  
  


max_allowed_packet = x M

wait_timeout=10

, buffer_size , !

 

read_buffer_size 

read_rnd_buffer_size


3、ERROR 1418 (HY000) at line 24166: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

root@xxxx ~]# mysql -uroot -p xxxx  
  


MySQL bin-log , , 1418 :

1. SET GLOBAL log_bin_trust_function_creators = 1;

2.MySQL , --log-bin-trust-function-creators , 1

3. MySQL my.ini my.cnf [mysqld] log-bin-trust-function-creators=1


3 :( )

CREATE PROCEDURE, CREATE FUNCTION, ALTER PROCEDURE,ALTER FUNCTION,CALL, DROP PROCEDURE, DROP FUNCTION , 。 , ( 、 、 ) , ( ) , 。


,MySQL :

, , 。

, , 。


,

:

DETERMINISTIC NOT DETERMINISTIC 。

, NOT DETERMINISTIC, DETERMINISTIC 。 

: NOW() ( ) RAND() 。 NOW() , 。RAND() 。 ,www.linuxidc.com , 。


:  

CONTAINS SQL, NO SQL, READS SQL DATA, MODIFIES SQL 。

NO SQL READS SQL DATA , , , , CONTAINS SQL。


, CREATE PROCEDURE CREATE FUNCTION , DETERMINISTIC NO SQL READS SQL DATA , 1418 。


bin-log,

1 DETERMINISTIC

2 NO SQL SQl ,

3 READS SQL DATA ,

4 MODIFIES SQL DATA

5 CONTAINS SQL SQL


1、 ( 、 、 ) , DETERMINISTIC NO SQL READS SQL DATA ,

:

CREATE DEFINER = CURRENT_USER PROCEDURE `NewProc`()

    DETERMINISTIC

BEGIN

 #Routine body goes here...

END;;

2、 , 、 SUPER , log_bin_trust_routine_creators 1。 :

1. SET GLOBAL log_bin_trust_function_creators = 1;

2.MySQL , --log-bin-trust-function-creators , 1

3. MySQL my.ini my.cnf [mysqld] log-bin-trust-function-creators=1


MySQL ( )

MySQL !

:http://oldboy.blog.51cto.com/2561410/1728380

1005:

1006:

1007: , <=================

1008: , <=================

1009:

1010:

1011:

1012:

1020:

1021: ,

1022: ,

1023:

1024:

1025:

1026:

1032: <=============================

1036: ,

1037: ,

1038: ,

1040: ,

1041:

1042:

1043:

1044:

1045: ,

1048:

1049:

1050:

1051:

1054:

1062: , <==========================

1065: SQL ,SQL

1081: Socket

1114: ,

1116:

1129: ,

1130: ,

1133:

1141:

1142:

1143:

1146:

1147:

1149:SQL

1158: , ,

1159: , ,

1160: , ,

1161: , ,

1169: ,

1177:

1180:

1181:

1203: ,

1205:

1211:

1216: ,

1217: ,

1226: ,

1227: ,

1235:MySQL ,