FAQ Database Discussion Community


What this message mean in MySQL Table does not support optimize, doing recreate + analyze instead?

mysql,mysql-workbench,mysqldump
Hi i am working on MySQL 5.5 and trying to do index rebuild using Optimize table query i am getting below error, Table does not support optimize, doing recreate + analyze instead What this mean for ? is MySQL engine not allowing to Index Rebuild ? what getting done behind...

Select from view and join from one table or another if no record available in first

mysql,mysql-workbench,mysqldump
I have a view and two tables. Tables one and two have the same columns, but table one is has as small number of records, and table two has old data and a huge number of records. I have to join a view with these two tables to get the...

Can mysqldump get me the database but only *some of the data?

mysql,mysqldump
I'm looking through the manual and not seeing anything that would allow me to get a copy of the db, but to *not include the data from some specified tables (however I DO want the tables - just not the data in them). In other words, if I have a...

automate mysqldump to local WIndows computer

linux,windows,ssh,mysqldump,plink
I'm trying to use plink on Windows to create a tunnel to a Linux machine and have the dump file end up on the Windows machine. It would appear that this answer would work and is the basis of my question. But trying it out and looking at other answers...

Getting warning ignoring option '--databases' due to invalid value 'testdatabase' in mysql while importing data

mysql,linux,mysqldump
i am getting warning ignoring option '--databases' due to invalid value 'testdatabase' in mysql while importing sql data into a database.Its working fine when I do it on my local machine but same is not working on remote server through putty.I have copied the file on remote server. heres my...

How to find Missing Indexes in MySQL?

mysql,mysql-workbench,mysqldump
5 and i want to identify missing indexes in it. Can somebody please help me to identify ? This will help us to increase the performance of query that leads to application.

mysqldump command with java Runtime.getRuntime().exec(command) not generating dump

java,runtime,exec,mysqldump
i have tried with the following code snippet: Process p; String command="mysqldump -u'scmuser' -p'scm$123' --routines db_name > /home/ubuntu/wh_demo_db_reset.sql"; p = Runtime.getRuntime().exec(command); the dump file is not generated and not thrown any error. i am unable to predict the exact issue please help me. thanks in advance....

Escape password in mysqldump command

mysql,passwords,mysqldump
I am using this; mysqldump -u userabc -pabc123 dbname | gzip > /var/backups/archives/mysql/dbname_$(date +\%d-\%m-\%Y_\%T).sql.gz This works but if the password contains a ^ for example it fails, how can I escape this character and still have mysqldump work with the -p flag; mysqldump -u userabc -pabc^123 dbname | gzip >...

exec mysqldump to back up database in sql format [SOLVED]

php,mysql,amazon-web-services,mysqldump
I'm trying to use PHP's exec() function to run mysqldump to back up a database named projectdata from Amazon Web Service. But I can only create an empty sql file. I'm running the php file with xampp, under Windows 7 where mysqldump is in C:\xampp\mysql\mysqldump exec('C:\xampp\mysql\bin\mysqldump --user=user --password=password --host=cannotTellyou.amazonaws.com:3306 projectdata...

Populating ms sql with sql files

database,sql-server-2008,tsql,mysqldump,sqlcmd
I already have an existing database I am trying to keep up to date on a daily basis. I get a daily dump of sql files. The batch script below created and populated the database the first time I run it, but that doesn't work when I try to update...

Use of mysqldump option --single-transaction

mysqldump
In tables like InnoDB, MyISAM etc engines. When we use mysqldump with option --single-transaction etc. whats the use of that option? i.e. see the code here. /usr/bin/mysqldump -h ${HOST} -u${SOURCEUSER} -p${SOURCEPASS} \ --skip-add-drop-table -t --skip-lock-tables --single-transaction --skip-add-locks --complete-insert -q -e --skip-disable-keys \ --where="ID=${ID}" \ ${SOURCEDB} ${SOURCETABLE} | sed -e "s/INSERT...

How to Transfer MySQL Data From Raspberry Pi to my PC

mysql,raspberry-pi,mysqldump
I've started using Raspberry Pi few days back. I need to transfer a database from my Raspberry Pi to my PC. I've installed MySQL on the Raspberry Pi and put some data in the database. I've already installed MySQL on my PC. I need to transfer data from the MySQL...

mysqldump with date and time in backup file name on windows

windows,cmd,filenames,mysqldump
I am unix man, and I really don't like work on windows. I am asking You for help. I am trying to make regular backups of mysql database in microsoft windows cmd. Here is my current script for that: C:\xampp\mysql\mysqldump.exe -hlocalhost -uroot -ppass stp > V:\backup_3.2.2.6__%date:/=%.sql I would like to...

MYSQL - Nothing happen while trying to import DB from mysqldump file

mysql,mysqldump,dump
Im developing a website, locally on Ubuntu 14.04 LTS , with a standard LAMP installation. Finished the "tests" phase locally, i would move the db on a VPS to start doing some tests on the web. Hence, i've dumped the db with mysqldump -u root -p --opt example > emample.sql...

Error Code 13 in Mysql on UNIX. Can anyone Help me?

mysql,sql,unix,mysqldump,database-administration
I'm Using MySQL Server on UNIX System, when i'm execute the below query SELECT * INTO '/home/krunal/backupData/myBackup1.txt' FROM tbl_Property; it shows the error ERROR 1 (HY000): Can't Create /Write to file >'/home/krunal/backupData/myBackup1.txt' (Errorcode : 13) Can anyone tell me that how can i solve this error **Note** : I have...

MySQLdump hangs with routines

mysql,function,mysqldump,procedures,routines
I am trying to use a bat file to do a complete copy of a database to a different database. There are procedures and functions which need to be transferred over which is my biggest problem. When I use mysqldump -u user -p password db1 -v -R | mysql -u...

Adding a Foreign Key from a SQL Dump fails

mysql,mysqldump,mysql-error-1064
I'm trying to create a database from an SQL Dump. I wrote it like this: CREATE DATABASE IF NOT EXISTS rsa_database; CREATE TABLE IF NOT EXISTS `keys` ( `id` int(11) NOT NULL auto_increment, `public_key` varchar(20) collate latin1_general_ci NOT NULL, `private_key` varchar(30) collate latin1_general_ci NOT NULL, PRIMARY KEY (`id`) ); CREATE...

Ubuntu 14.04 LTS and Mysql 5 = 12h for importing 180mo

mysql,ubuntu-14.04,mysqldump
I have very slow performance with Ubuntu 14.04 LTS and MySQL 5.5.43 I need to import 4GB in database. 12h later, the size of database is 180 mo I did the same import with a older Ubuntu and MySQL 5.5.43 This took 3h ... I use default settings for Ubuntu...

Mysqldump of single table returns errno 32

mysql,mysqldump
I need to do a mysqldump of a single table from one server to another. If I dump the entire db all goes well: mysqldump {database_name} | mysql -h {host_name} -u {user_name} -p{password} {database_name} But if I try to dump a single table like this: mysqldump {database_name} {table} | mysql...

Automate MySQL backup @localhost with mysqldump in Windows 8

mysql,windows,operating-system,scheduled-tasks,mysqldump
I'm trying to set up a task in Windows 8 to automate my localhost db dump. I've created the task to run daily with the following command line: C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe and parameters: --user=root --password=donttellya --result-file=dumped.sql mydb It works but doesn't terminate (running in the tasks list). Also, I'd...