mysqldump

Issue with mysql backup in cron

一世执手 提交于 2019-12-11 17:28:19
问题 I'm just trying to perform a mysqldump and have it scheduled. I'm using RHEL 5 and have added it to the crontab as shown below: 22 13 * * * root mysqldump --user=root --password=12345 mysqldb > /var/backups/mysqldb date +%d%m .sql The .sql file never ended up in the backups folder. I even attempted to run this command line and it worked fine which tells me its something to do with the cron. Furthermore, I added a simple comand like "ls" and the output to the same directory and it worked fine.

Stored Procedure to create Insert statements in MySql?

只谈情不闲聊 提交于 2019-12-11 16:07:00
问题 I need a storedprocedure to get the records of a Table and return the value as Insert Statements for the selected records. For Instance, The stored procedure should have three Input parameters... 1- Table Name 2- Column Name 3- Column Value If 1- Table Name = "EMP" 2- Column Name = "EMPID" 3- Column Value = "15" Then the output should be, select all the values of EMP where EMPID is 15 Once the values are selected for above condition, the stored procedure must return the script for inserting

Calling “mysqldump” with Runtime.getRuntime().exec(cmd) from Windows 7

戏子无情 提交于 2019-12-11 12:07:13
问题 I am trying to dump a MySQL database within my Java application the following way: String[] command = new String[] {"cmd.exe", "/c", "C:/mysql/mysqldump.exe" --quick --lock-tables --user=\"root\" --password=\"mypwd\" mydatabase > \"C:/mydump.sql\""}; Process process = Runtime.getRuntime().exec(command); int exitcode = process.waitFor(); The process fails with exit-code 6. I somewhere read that the operand ">" is not correctly interpreted and there was the hint to use "cmd.exe /c" as prefix.

How to increase maximum upload file size of LOAD DATA INFILE query?

放肆的年华 提交于 2019-12-11 11:45:17
问题 I am loading a text file into database using load data query. There is no problem uploading the file size upto 2GB But i couldn't upload the files more then 2 GB. My query is given below LOAD DATA INFILE 'mytempfile' INTO TABLE feeds How can i increase my maximum upload file size in mysql? Please advise.. 回答1: I got a answer. i can split big size of zip files into small size of multi files. if we load large size of file database dump problem occurred. its working great with me. Cheers. 来源:

MYSQL replay dumpfile all or nothing in a transaction

﹥>﹥吖頭↗ 提交于 2019-12-11 10:52:03
问题 MYSQL re dump from a log.sql all or nothing mysql -h "$databaseHost" -u "$username" --password="$password" "$databaseName" < /path/to/project/log.sql if this log.sql file contains an error in middle then transaction before error are done and after error are not done.. BUT i want that either whole of the sql file show be re dump OR nothing from the file should be re-dumped i am using MySQL database and Debian(6.0.1) O.S log.sql start transaction; insert into demo_table values('abc'); insert

dump matching tables php

扶醉桌前 提交于 2019-12-11 09:25:58
问题 I'm trying to dump some of my tables if the prefix of theme is matching a given sub string using php. Trying to use php's system did not bring any result in sense the dump file was not created. I thought to use the command line function exec to achieve my result and I was making the following exec('E:/xampp/mysql/bin/mysqldump '. $dbname .' -h '. $this->host .' -u ' .$this->user . ' $(E:/xampp/mysql/bin/mysql -u '. $this->user . ' -p ' . $dbname .' -Bse "show tables like \'wp_dev%\'")> mydb

I would like to simplify SSH Tunneling to do a MySQL Dump and SCP the file to local machine

只谈情不闲聊 提交于 2019-12-11 08:59:04
问题 Server setup (fake IPs) utility - 1.1.1.1 - SSH access on public IP database2 - 1.1.1.2 - SSH access on private IP from utility On a semi-regular basis I need to do a mysqldump on database2 and pull that down to my local machine so I can debug our app with real data. My current process is as follows: ssh into utility ssh into database2 execute mysqldump command exit from database2 scp dump file down to utility exit utility scp dump file down to local machine Needless to say this is not

loading mysql dump or text file into microsoft access 2003

偶尔善良 提交于 2019-12-11 04:13:50
问题 I am not an expert in MS Access, I have been given a text files basically with over hundred thousand records in it and have been asked to load that text file into the MS access database. As I know MySQL, I uploaded that text file into the MySQL database first using normal Load text file command and it worked as expected. However, when in Access 2003, I go to file menu to Get external data and browse the text file, it just don't do anything after I select the file. I have tried loading through

How to drop and re-populate mysql databases?

十年热恋 提交于 2019-12-11 02:06:01
问题 I have a mysql database with 10 tables and need to drop and repopulate the database to run some performance tests. Using mysqldump, I can dump out the data. What steps should I follow next, to clear the database, and re-import? Will need to run this for different sizes of the database (i.e. tables with different number of rows) to calculate the db performance, so I need to make sure these steps can be replicated. 回答1: You might want to look at the options on mysqldump such as --add-drop

Slow Import of Large MySQL Dump

 ̄綄美尐妖づ 提交于 2019-12-11 01:19:00
问题 I'm trying to import a very large MySQL dump file into a new MySQL server. However, after a certain point, it seems to bog down. I'm about 250M rows in, and it's taking over 10-12 seconds to run even a single line of the dump. It seems to hang on "update". Am I missing something I should do to make this import go faster? It's a pretty beefy server so I don't think it's the I/O.. 回答1: What seemed to work for me with a 'beefy' server, was splitting the file into several smaller and importing