mysql导入导出数据 关键字: db mysql 1、导出整个数据库 mysqldump -u 用户名 -p 数据库名 > 导出的文件名 mysqldump -u root -p testDb > db.sql 2.导出数据库
#修改存储过程、函数、事件、触发器、视图的 DEFINERselect definer from mysql.proc;update mysql.proc set definer='billing@%';select DEFINER from mysql.EVENTS;update mysql.EVENTS set definer='billing@%';select DEFINER from information_schema.VIEWS; select concat("alter DEFINER=`billing`@`%` SQL SECURITY DEFINER VIEW ",TABLE_SCHEMA,".",TABLE_NAME," as ",VIEW_DEFINITION,";") from i事务: 通俗的说事务: 指一组操作,要么都成功执行,要么都不执行.---->原子性 在所有的操作没有执行完毕之前,其他会话不能够看到中间改变的过程-->隔离性 事务发生nformation_schema.VIEWS where DEFINER<>'billing@%'; select DEFINER from information_schema.TRIGGERS;drop trigger upc.t_trigger1;DELIMITER ;;CREATE DEFINER=`billing`@`%` trigger upc.t_trigger1 before delete on upc.sys_sequences
for each row begininsert into upc.sys_sequences_bak values(2,old.SEQUENCE_NAME,old.START_BY,old.INCREMENT_BY,old.LAST_NUMBER,old.JVM_STEP_BY,now());end;;DELIMITER ;
一、查看存储过程 1.show procedure status; //查看所有的2.show create procedure proc_AllUser[proc_name]; 查看proc_AllUser这个存储过程的具体信息3.se