Quantcast
Channel: MySQL Forums - Backup
Viewing all 537 articles
Browse latest View live

mysqldump / utf8 (no replies)

$
0
0
hi,

I have some trouble dumping and re-importing my sql database and data.
I load data with a Perl script into a MySQL database. When quering the data everything looks fine. When dumping the data with mysqldump some chars are garbled. I googled quit a bit, tried a lot of thing but with no luck. Hope anybodye here could help me out.

Some info:
MySQL version: 5.0.95
I created the database script with MySQL Workbench 6.3, default collation latin1, tables utf8 (I also tried both utf8).
After loading the database en querying a title it looked ok
After dumping and re-importing it on another system the data was corrupted.
The letter 'ü' came out as (hex) C3BC and was not shown properly.
C3BC is binary 11000011 10111100 -> 2 bytes of utf8 -> gives [110]00011[10]111100 -> FC = 'ü'

What is going on here? And what am i doing wrong?

Regards,
Hans Scholte

Data table format Not correct (1 reply)

$
0
0
Hi,
I wanted to transfer my website, one hosting to another. But, problem is database. My website created by wordpress. I can perfectly export my database but, when I try to import on other hosting its say database table format wrong.

What wrong, please can anyone tell me?

Thanks a lot!

Instructions for using mysqldump (no replies)

$
0
0
I would like to use mysqldump. If I go into cmd (I am using Windows) it says 'mysqldump' is not recognized....
If I type in php mysqldump it says Could not open input file: mysqldump
I checked the documentation and it shows this line:
shell> mysqldump [options] db_name [tbl_name ...]
So, I guess my question now is what is "shell" and how do I enter "shell"?

MySQL Enterprise Backup 4.1: Improved logging messages (no replies)

MySQL Enterprise Backup 4.1: Improved Redo Log Copying During Backup (no replies)

MySQL Enterprise Backup 4.1: Optimistic Incremental Backup (no replies)

Should we use mysqldump or mysqlpump? (no replies)

$
0
0
We export an entire database, gz compress the files, transfer to another network, and reload the DB. Currently we use mysqldump and the export took about 2 hours. I noticed that mysqlpump does essentially the similar thing and wonder what are the differences of the two utilities. Should we use mysqlpump instead since it allows multi-thread? Is mysqlpump similar to the Oracle data pump where the dump files are generated on the DB server rather than on the client computer where the utility program, such as mysqldump, is running?

We may not have the UNIX login to access the source DB's server so if mysqlpump generates the files on the server, then we can't use it.

Any suggestions?

importing backup data with events (no replies)

$
0
0
Hi! I dont know if I'm in the right section. Can anyone help me on importing my backup data along with the events?

Im using this command to backup my db along with the events:

mysqldump --user=root --password=rootpass --host=localhost --port=3307 --result-file="mydir\backup.sql" --default-character-set=utf8 --single-transaction=TRUE --routines --events "myDatabase"

Im using this command to copy it to another database:

mysql --user=root --password=rootpass --host=localhost --port=3307 myDatabase2 < "mydir\backup.sql"

I have no problems on copying the table data from "myDatabase" to "myDatabase2" except that events are not copied in the process. I tried using this command but it doesnt work haha:

mysql --user=root --password=rootpass --host=localhost --port=3307 myDatabase2 < "mydir\backup.sql" --events

Any kind of help will be appreciated. Thanks!

mysqldump: unable to backup database (1 reply)

$
0
0
Hi all,

I'm having a problem to backup my database. Error message is shown below. Please advise.

This is the error message:
MariaDB [db_test]> mysqldump db_test > db_test.sql;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysqldump db_test > db_test.sql' at line 1
MariaDB [db_test]>

MariaDB [db_test]> status
--------------
mysql Ver 15.1 Distrib 10.0.17-MariaDB, for Linux (i686) using readline 5.1

Connection id: 32
Current database: db_test
Current user: root@localhost
SSL: Not in use
Current pager: less -EM
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 10.0.17-MariaDB Source distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Insert id: 1
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 1 hour 38 min 46 sec

Threads: 2 Questions: 187 Slow queries: 0 Opens: 14 Flush tables: 1 Open tables: 4 Queries per second avg: 0.031
--------------

MariaDB [db_test]>

This is how I created the database.
MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)

MariaDB [(none)]>
MariaDB [(none)]> CREATE DATABASE db_test;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]>
MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| db_test |
| information_schema |
| mysql |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]>
MariaDB [(none)]> USE db_test
Database changed
MariaDB [db_test]> SHOW TABLES;
Empty set (0.00 sec)

MariaDB [db_test]> CREATE TABLE user (id int(11) not null PRIMARY KEY AUTO_INCREMENT, first varchar(128) not null, last varchar(128) not null, uid varchar(128) not null, pwd varchar(1000) not null );
Query OK, 0 rows affected (0.00 sec)

MariaDB [db_test]>

MariaDB [db_test]> SHOW COLUMNS FROM user;
+-------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| first | varchar(128) | NO | | NULL | |
| last | varchar(128) | NO | | NULL | |
| uid | varchar(128) | NO | | NULL | |
| pwd | varchar(1000) | NO | | NULL | |
+-------+---------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

MariaDB [db_test]>

MariaDB [db_test]> SELECT * FROM user;
Empty set (0.00 sec)

MariaDB [db_test]>

MariaDB [db_test]> INSERT INTO user (id, first , last , uid , pwd) VALUES (null , 'John' , 'Doe' , 'admin' , '123');
Query OK, 1 row affected (0.00 sec)

MariaDB [db_test]> SELECT * FROM user;
+----+-------+------+-------+-----+
| id | first | last | uid | pwd |
+----+-------+------+-------+-----+
| 1 | John | Doe | admin | 123 |
+----+-------+------+-------+-----+
1 row in set (0.00 sec)

MariaDB [db_test]>

Mysqldump on windows client works but in bat file doesn't (no replies)

$
0
0
Hello, I run the command below in my Windows 7 Enterprise from a cmd environment on my local client and it works. I made a BAT file and when I execute on my local client it fails with
mysqldump: Got error: 1045: Access denied for user 'xxxxxxx'@'ip address'
(using password: YES) when trying to connect

I am stumped. Why would the command fail in a bat file?

"C:\Program Files\MySQL\MySQL Workbench 6.3 CE\mysqldump.exe" --databases mydabase --result-file="C:\xxxx\xxx\xxxx\xxxxx\GOES\MYSQL\MySql\backup\databases.%TIMESTAMP%.sql" --user=xxxxxxx --password=xxxxxx -h xxxx.xxxxxx.us-east-1.rds.amazonaws.com -P3306

Backing up, restoring views in MySQL using Mysql dump (no replies)

$
0
0
Is there anyway of using MySQLDump to backup and restore at a minimum MySQL views at a minimum or ideally backup up data as well?

mysqldump 4.0.20a latin1 character issues when importing to newer MySQL (no replies)

$
0
0
I've googled for solution and wasn't able to find anything that works. Basically, I would do a mysqldump from a 4.0.20a server and then try to import into a version 5 server. No matter what charset/collation I use, certain characters will be either a question mark or garbled when it is imported into MySQL 5.x server. These are special characters like ellipsis, apostroph, mdash (i think) and probably smart quotes as well.

There has got to be a way to do this. I stuck on an old machine running old software just because of this one issue. Please help! Thanks !

Reload of sql dump file failed (2 replies)

$
0
0
Hi,

I created a SQL dump using "mysqldump --all-databases --add-drop-database" and transferred it to a backup server. When I tried to import it using the mysql command it failed during the drop of the "mysql" schema leaving that schema empty. Before I could recreate it the mysqld process failed and now it won't start up again as it says it needs the mysql.priv table to start up.

How can I recover from this?

I am using MySQL 5.5.23 on RedHat Linux 6.

Thanks,
Damien.

Continuous realtime backup on Synology server (no replies)

$
0
0
Hello,

I would like to ask:

Synology offers a Backup tool. This basicaly syncs all files within the directories you select. Copying them to synology server.

If I make a task to backup the whole /Data dir on my MySQL server (MySQL 5.7, runs on Windows 2016), would that be a valid backup ?

Thanks
Alex

MYSQL backup and restore approaches (1 reply)

$
0
0
Hi All,

We are an enteprise working on designing a solution for backing up and restoring MySQL. We would later integrate this with Netbackup for storage. Could anyone please suggest the available utilities/options provided by MySQL? We cannot use any licensed softwares and this need to be developed on both Linux and Windows.

Archana

Does --single-transaction apply to all db'es being dumped with mysqldump simultaneously? (no replies)

$
0
0
I have 3 databases which need to be kept in sync. They are on the same db server/mysql instance

At the moment I do a mysqldump with :

--databases db1 db2 db3 --quick --single-transaction

Someone has said that the single-transaction will only apply to one of the databases at a time (& the tables within) ergo the 3 databases might get out of sync during the dump. The only vague references I can find to this are:

https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_databases
"--all-databases, -A
Dump all tables in all databases. This is the same as using the --databases option and naming all the databases on the command line."

&

"--single-transaction
This option sets the transaction isolation mode to REPEATABLE READ and sends a START TRANSACTION SQL statement to the server before dumping data. It is useful only with transactional tables such as InnoDB, because then it dumps the consistent state of the database at the time when START TRANSACTION was issued without blocking any applications."

so in situation like this is the single transaction applicable to all 3 databases in the list or just the tables within a single database and thus given the time taken to dump the 3 databases might be out of sync?

If the latter then is there any known solution to dumping multiple db'es within a single transaction?

TIA

mysqldump - Check backup history (no replies)

$
0
0
Hi All,

I am using "mysqldump" command to perform scheduled database backup for 2 production databases.

As this is a newer method for us to take backups, earlier we were using "mysqlbackup" (physical backup of files), I would like to know how to check that the database backup has been done fine?

I would like any one of the below methods possible:
1. run mysql query on the database (I have mySQL Workbench) to find the backup database.
2. Can mySQL Workbench be used to check this (asking as it allowed us to check backup status of mysqlbackup backup?

Any help is highly appreciated.

Thanks,
Mandar

overwriting of database (1 reply)

$
0
0
i have 2 servers,server 1 is used as main backup and server 2 is used as remote backup
mysqldump -u root -p db | ssh user@192.**8.0.000 mysql -u root -p copybase
i just used the above mysql cmd to make a dump of server 1 and imported directly to a database already created in server 2.But every time when executing this mysql dump cmd,a dump is created and is sented to remote database where there already exist a previously imported file,so we need to overwrite the remote db with current dump.How can i overwrite the database with the above mysql dump cmd ?

mysqlbackup: ERROR: Log scan was only able to reach to 25920574 but a copied database page was modified at 29922199 (no replies)

$
0
0
Hi,

I am trying to run an image backup using mysqlbackup version 3.12.0, it runs but then it fails with the following error below:

mysqlbackup: ERROR: Log scan was only able to reach to 25920574 but a copied database page was modified at 29922199


what could be causing the error?

thanks

MySQL Enterprise Backup with MySQL InnoDB Cluster Best Practice (no replies)

$
0
0
When running three MySQL 5.7.18 Enterprise servers in a MySQL InnoDB Cluster, the MySQL documentation states the best practice is to run the MySQL Enterprise Backup 4.1.0 on a secondary server in the cluster (to avoid a performance impact on the primary). However, when we run the backup on a secondary server, we receive the error: cannot run backup because super-read-only is set to 'on'. So, our backup script now sets super-read-only to 'off' on the secondary server, then runs the backup, then sets super-read-only to 'on'.

As our goal is to run a hot backup in order to maintain high-availability and fault-tolerance. When our secondary MySQL server temporarily sets super-read-only to false, will it affect a failover from primary to itself in the event the primary fails during a backup?
Viewing all 537 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>