mysqldump

Reverse engineering a mysqldump output with MySQL Workbench gives “statement starting from pointed line contains non UTF8 characters” error

落爺英雄遲暮 提交于 2019-12-23 02:36:47
问题 I have a huge .sql file from a mysqldump command. I ran this file in MySQL workbench and it seems to create the tables fine. But it gives the following error log ERROR: Line 49076: SQL statement starting from pointed line contains non UTF8 characters. Statement skipped. ERROR: Line 49077: SQL statement starting from pointed line contains non UTF8 characters. Statement skipped. ERROR: Line 49078: SQL statement starting from pointed line contains non UTF8 characters. Statement skipped. // Loads

dumping a mysql table to CSV (stdout) and then tunneling the output to another server

二次信任 提交于 2019-12-22 10:29:24
问题 I'm trying to move a database table to another server; the complication is that the machine currently running the table has little to no space left; so I'm looking for a solution that can work over the net. I have tried mysqldumping the database from the src machine and piping it into mysql at the dest; but my database has 48m rows and even when turning auto_commit off & trx_commit cmd to 2; I am getting some dog slow times. mysqldump -uuser -ppass --opt dbname dbtable | mysql -h remove

Can't get mysqldump to connect to local mysql instance (error 2003 / 10061)

好久不见. 提交于 2019-12-22 07:07:50
问题 I've got mysql 5.1 on a windows xp machine. It's listening on port 3308. I'm trying to use mysqldump: > mysqldump -u root -pmypassword dbname > out.sql Getting an error: mysqldump: Got error: 2003: Can't connect to MySQL server on 'localhost' (10061) when trying to connect Not sure what the problem is, looking at --help dumps variables and shows port=3308 as I set in the mysql installation (instead of default 3306). I don't think there's anything different with my installation. I also tried

How to import SQL dump to a table without overwriting duplicate fields

与世无争的帅哥 提交于 2019-12-22 06:56:30
问题 how do I import a MySQL dump file to a database without overwriting records with the same value? 回答1: Here is the link to the manual. You can specify whether to replace existing records. --replace, -r The --replace and --ignore options control handling of input rows that duplicate existing rows on unique key values. If you specify --replace , new rows replace existing rows that have the same unique key value. If you specify --ignore , input rows that duplicate an existing row on a unique key

MySQL “set unique_checks”, “set foreign_key_checks” vs. “alter table disable keys”

匆匆过客 提交于 2019-12-22 06:50:22
问题 We're having a problem where a mysqldump script is spending 90% of it's time populating a small handful of the tables it deals with. Eliminating FK's and indexes eliminates the speed problem, but is not an acceptable solution. The dump script does have: /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; Can we expect any different behavior from ALTER TABLE foo DISABLE KEYS ? Also, is disable

Is there a tool to dump a Neo4j graph as Cypher and re-load it from Cypher?

和自甴很熟 提交于 2019-12-22 04:29:18
问题 Everyone familiar with MySQL has likely used the mysqldump command which can generate a file of SQL statements representing both the schema and data in a MySQL database. These SQL text files are commonly used for many purposes: backups, seeding replicas, copying databases between installations (- copy prod DBs to staging environments etc) and others. Is there a similar tool for Neo4j that can dump an entire graph into a text file of Cypher statements, that when executed on an empty database

mysql面试题

孤街醉人 提交于 2019-12-22 03:04:26
1、 MySQL 的复制原理以及流程 基本原理流程,3个线程以及之间的关联; 2、 mysql 中myisam与innodb的区别,至少5点 (1)、问5点不同; (2)、innodb引擎的4大特性 (3)、2者selectcount(*)哪个更快,为什么 3、MySQL中varchar与char的区别以及varchar(50)中的50代表的涵义 (1)、varchar与char的区别 (2)、varchar(50)中50的涵义 (3)、int(20)中20的涵义 (4)、mysql为什么这么设计 4、问了innodb的事务与日志的实现方式 (1)、有多少种日志; (2)、事物的4种隔离级别 (3)、事务是如何通过日志来实现的,说得越深入越好。 5、问了MySQL binlog的几种日志录入格式以及区别 (1)、binlog的日志格式的种类和分别 (2)、适用场景; (3)、结合第一个问题,每一种日志格式在复制中的优劣。 6、问了下MySQL 数据库 cpu飙升到500%的话他怎么处理? (1)、没有经验的,可以不问; (2)、有经验的,问他们的处理思路。 7、sql优化 (1)、explain出来的各种item的意义; (2)、profile的意义以及使用场景; 8、备份计划,mysqldump以及xtranbackup的实现原理 (1)、备份计划; (2)、备份恢复时间; (3

mysql备份与恢复

我的梦境 提交于 2019-12-22 03:02:16
有网友问我在win2003下如何自动备份MySQL数据库,既然是自动备份,那肯定得写脚本。我想了想,这个并不是很困难,是很容易实现的,备份可以用脚本实现,那自动又该如何实现呢?也很简单,就用windows自带的“任务计划”功能,设定一个时间,让系统定时跑脚本,不就实现了自动备份数据库的功能了吗?首先把脚本代码贴出来: @echo on REM------------------------backup bugdb which is InnoDB----------------------------- del F:\backup\website\bugdb_*.sql cd F:\usr\wamp\mysql\bin set year=%date:~0,4% set month=%date:~5,2% set day=%date:~8,2% set filename=bugdb_%year%%month%%day%.sql mysqldump.exe bugdb -uroot -p123456 > F:\backup\website\%filename% @echo off 依次解释一下每句代码的意思: 第四行:删除指定目录下的文件名包含有“bugdb_”字样的sql文件。因为这个代码是我先前写的,在公司的服务器上每天晚上跑一次。所以每次备份之前,先删除头天已备份成功的文件。

day45

人盡茶涼 提交于 2019-12-21 17:58:37
备份 #导出 执行dump时,会对表进行加锁,防止其他线程操作 MySQL一次只能dump1000条数据mysqldump -uroot -p db3 > D:/db3.sql#导入mysql -uroot -p db3 < D:/db3.sqlsource D:/db2.sql;​#没有会自动创建数据库,并且自动使用数据库mysqldump -uroot -p -B db2 > D:/db2.sql#只备份MySQL数据库的表结构,没有数据 mysqldump -uroot -p -d db2 > D:/db2.sql #只备份数据库的表数据数据,没有表结构mysqldump -uroot -p -t db2 > D:/db2.sql 来源: https://www.cnblogs.com/zhuqihui/p/11055165.html

ERROR 1465 “Triggers can not be created on system tables” after restore from SQL created by mysqldump

南笙酒味 提交于 2019-12-21 17:26:39
问题 I'm running a mysql 5.6 server on amazon RDS and set up a read replica I use to create backups using mysqldump. I tried with the "--all-databases" option, but when I'm trying to import the SQL created by mysqldump, I end up with this error from the mysql command client: ERROR 1465 "Triggers can not be created on system tables" I used "--all-databases" because I basically want to restore everything in RDS as it was before in case of a crash. Maybe that's wrong, and I should only select my