Shell script to backup MySQL database(备份MySQL 脚本)

this is shell script to backup mysql database, using mysqldump to dump all databases into separate files, and encrypt backup file using zip password option, Generate a collective file using tar, ftp to ftp server, to send email to DBA .

,

MySql 5.5 tar安装及sysbench 配置

Next, let’s create the mysql user and group: groupadd m […]

mysql 无法退出sql命令行编辑

mysql> insert into core_user(login_name,real_name,password,email,create_time,is_disab…..
‘> quit
‘> exit
‘> bye
‘> ;
‘> \
‘> \c
‘> /c
终止批处理操作吗(Y/N)? y

遇到上面的情况无法终于sql编辑,最后没办法ctrl+c,强退了mysql ,后来找了一下官方文档

mysql 客户端数据导入

mysql 客户端数据导入要么生成insert sql,也可以用load data infile,记的字符集可不能忽略,设置字符集比如set name gb2312;下面做一个实例,用load的方法

-----

MYSQL ERROR 1093 (HY000): You can’t specify target table ‘core_member’ for update in FROM clause

今天删除mysql库中几条重复2次的记录,有个序列号member_id,取一个人最大用户名删除,没想到mysql语法还不一样

mysql> delete from core_member where member_id in(select max(member_id) from core_member where user_id in(select user_id from core_user where email=’xiangtan@xiangtan.com’) group by user_id);

ERROR 1093 (HY000):…