mysql相关知识

查询某个表有哪些字段,以逗号隔开
SELECT group_concat(column_name) FROM information_schema.columns WHERE TABLE_SCHEMA ='clever_prd3' and TABLE_NAME='plate',其中clever_prd3数据库名字,plate为表明

报错Lock wait timeout exceeded; try restarting transaction
关键字 事务没有提交锁住
解决:找出线程id,kill掉
select * from information_schema.innodb_trx
#find trx_mysql_thread_id
#kill 52730

创建函数出错
ErrorCode:1418
ThisfunctionhasnoneofDET

ERMINISTIC,NOSQL,orREADSSQLDATAinitsdeclarationandbinaryloggingisenabled(you*might*wanttousethelesssafelog_bin_trust_function_creatorsvariable)

设置set global log_bin_trust_routine_creators=1;

posted @ 2017-10-17 14:05  longtengdama  阅读(165)  评论(0编辑  收藏  举报