Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Mysql Dump And Windows


I have installed mysql on windows.

However, due to database corruption issues I would like to perform a backup every hour or so. As a result I plan to schedule a mysql dump at regular intervals(for example using the AT command). The problem is that the user that runs mysql dump has to supply the password. ie: myslqdump -u user -p databasename > backup.sql

My question is: how do I specify (in a .cmd file) the password to enter after the mysql command above? I do not think "echo password" is enough for mysql to pick up the password.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Importing Large Dump File Into Mysql On Windows
I have a 80 meg dump file created with mysqldump. I need to import it
into a mysql db on Windows.

On linux, I say "shell>mysql dbname < dumpfilename"
But that does not work on Windows. Importing via phpmyadmin is not
possible either since we are limited to 2 Meg file size.

Import Dump From Unix Mysql To Windows Mysql
I am trying to load a dump from a MySQL database on my ISP's server to my development environment on a Win 2K machine (running MySQL). When I run the mysql command to run the load script, MySQL gives the following complaint:

"ERROR 1064 at line 21: You have an error in your SQL syntax. Check the manual t
hat corresponds to your MySQL server version for the right syntax to use near 'D
EFAULT CHARSET=latin1' at line 7"

The dump from the ISP's server is created using mysqldump. The ISP is running MySQL 4.1.20. My development environment is MySQL 4.0.26. I have no problem loading dumps made from my development environment usng phpmyadmin.

Mysql Dump
I'm using MYSQL dump to back-up my database. What if i don't want the data inside the tables? How can i have it back up the tables but not the data?

currently i'm using:
mysqldump -h localhost -u tony -p test > test.sql

Mysql Dump
I have a database on my local machine, so i am connecting to localhost.

I am trying to execute a simple command through the MySQL console: mysqldump --opt quicken > quickenback.sql.

Can't seem to get it to work. Have tried in quotes, etc.

Any ideas?

BTW, I am running a delphi application which is connected to MySQL databases on both Windows (localhost) and Linux machines as I write this, so it is not a connection problem.

Mysql Dump
I want to load specific columns into a new table.

current_table:
recno, name, phone, active

new_table:
recno, address, active

I want to load:
select recno, active from current_table where active=1

into the new table.

do i use mysql dump? how do I put the query into the mysql dmp?

MySQL Dump
is there a way of making a mysql dump that would work in a php form sort of thing ?

i have a mysql database, and a few tables and in a specific table records of 'clients' and i wanted a script that would search for a 'client' with ID eg '4' and export all the 'client's with the ID of 4 and then show the data of which the file would contain.

Mysql Dump
Im trying to get mysqldump to create a text file that looks good in excel

atm Im using (anything inside ' 'is just a filled in field)

mysqldump --tab=C:data --opt 'database' -u 'login' -p --lines-terminated-by=''

The problem is that I want my rows to all be one line. And if the user pressed enter while inputting data into a text field the text file is giving it a new line inside the .sql file. ex. it looks like this

--
--
--

when I want the output to be like this ------

is it possible to somehow remove the newlines in a field before it does the dump so that it's all in the same line.

(or if not I'd love to be pointed to any kind of good tutorial on how to get a good text or csv output of a database so that I can import it into excel)

Mysql Dump
My client wants to frequently be able to dump his mysql db for use in excel (csv file is fine as well). I don't want him fiddling around with phpmyadmin and messing things up. Is there a script or some shortcut which would allow him to just dump to excel with a "click of a button"

MYSQL DUMP
Im trying to export my table in csv formatt? I cant seem to get it to work im getting this error:
mysqldump: unknown option -s

i dont have a -s in my script heres my script:

mysqldump -u root -fields -terminated-by=,-tab= c: emp -tables ehpadmin direct_referral > new.txt

MySQL Dump
I have done some research into a mysql dump, but cant really figure out the syntax. If I have a table names dis, and with user name of root and password of password, what sort of string would I need?

Mysql Dump On XP
I am having terrible trouble trying to find out the right command to restore a mysql dump into mysql on my XP machine. I am trying to use both the windows command line and the mysql command line client, but I can't get anything to work!

Been trying this:

mysql databasename < databasebackupfile.txt

And variations of with no success :-( I have checked the help file, and this is what it says to use. I am not a newbie to this, but I have never used mysql on windows.

Mysql Dump Woes!
Hi guys, i'm currently in the process of moving servers. And i'm trying to move my sql file for a phpbb forum to the new host. I'm using BigDump to install the .sql file. However it doesn't seem to work. The installation of the .sql file gets to about 30% and then i get an error such as

Error at the line 117905: INSERT INTO phpbb_asearch_wordlist (word_text, word_id, word_common) VALUES('françois', &#55619;&#56747;', &#390;');
Query: INSERT INTO phpbb_asearch_wordlist (word_text, word_id, word_common) VALUES('françois', &#55619;&#56747;', &#390;');
MySQL: Duplicate entry 'françois' for key 1
Stopped on error
I have edited and then deleted the row that caused the problem but i will then get an error for each line after that. So it's not an obvious syntax error as such.

I have a feeling that the problem is between the settings of both myslq databases. Here is a summary:

Exporting Server is running:
MYSQL 4.1.12
Language: English (en-utf-8)
MySQL Charset: UTF-8 Unicode
MySQL connection collation: utf8_bin
All rows are MyISAM and have collation latin1_swedish_ci

Importing Server is running:
MYSQL 4.1.12
Language: English (en-utf-8)
MySQL Charset: UTF-8 Unicode
MySQL connection collation: utf8_general_ci
All rows are MyISAM and have collation latin1_swedish_ci

Would the difference in the collation types make any difference?

Stop Mysql Before A Dump?
I want to make a dump on my DB, but I was asking myself if there are any problem to do that without stopping the DB before.

Have I to stop my DB before mysqldump? is there any provability that my dump backup will have any errors?

MYSQL Dump To Host
I would like to dump to my web host.

I am inputting the command:
$ mysqldump -u user -p password --databases databasename | mysql -u user -p password --host=host.com -C newDatabasename

Could someone confirm the following for me?
1) newDatabasename must already be created on host
2) In order to accomplish this, user must have sufficient rights on the host mysql server

Once the command is successfully completed, is there any indication that it has? Will newDatabase name appear in the mysql folder on the host? Do I need to 'undump' the newDatabase, or is it ready to use?

Any Way To Dump From Mysql 5.0 To 4.1.22-standard?
I have a MySQL 5.0 database that I have dumped to a flat file with:

mysqldump -u username -p databasename > mydatabase.sql

I have written a cgi perl script to import the dumpfile into a new table in an existing database. The script runs fine when I run it on the local host. But when I upload the same script and dumpfile onto a webserver that is running MySQL 4.1.22-standard, I get the following error when trying to import:

DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101' at line 7 at mysqlimport.cgi line 24, <FH> chunk 1.

I would have thought that a dumpfile would not be version dependent, but apparently it is. The database is very simple.

- Is there any way to edit it so that it will import into the lower rev db?
- Or is there a way to dump it into a lower rev format?
- Or is there some other solution (other than upgrading the server)?

MySQL Dump Help With Version ;4.0.14-log
Every time I try to do a back up of the databases on our system i get this
error:

ea990# mysqldump -u root -p --opt -full test > test.sql
mysqldump: unrecognized option `--max_allowed_packet=16M'

and it doesnt seem to dump anything, I have tried various options, and
usually use
my db back up script but that doesnt seem to work as well.

----
#!/bin/sh
# mysql nightly dump

PASS="xxxxx"

DATE=`date "+%Y-%m%-%d"`
/usr/local/bin/mysqldump --password=$PASS -A >
/usr/home/http/mysql_dump/backup.$DATE
/usr/bin/bzip2 -9 /usr/home/http/mysql_dump/backup.$DATE
-------

but that gives me the same error as above.

Mysql Dump File
Okay I finally decided to switch from asp to php. Now I need to convert all my Access 2000 databases to mysql. I used this program called accessdump to create a dump file, "db.sql". Now, How do I use this file to recreate my MYSQL database. Do I use "phpmyadmin" or something else?

MySQL Dump Date
i am using mysql dump from an auto scheduled task. i need the date to be in the file name when i back it up. at the moment the existing files just get written over.

Mysql Dump File
I've got a file that has a load of INSERT INTO lines in it which I'm dumping into my database. This works fine but I was wondering is it possible to display a text output from this file.

e.g.
INSERT INTO table1 VALUES (1,'a');
INSERT INTO table1 VALUES (2,'b');

## display 'Table2 entry finished'

INSERT INTO table2 VALUES (1,'c');
INSERT INTO table2 VALUES (2,'d');

## display 'Table2 entry finished'


Can't Import Dump Files In Mysql 5
I apologize upfront if this is common knowledge. I've searched for quite a while and found nothing concrete.

Using phpmyadmin 2.6.4-pl4
MySQL 4.0.23-nt
php 4.4.4

When I export and make a sql file, I cannot import the data using this setup:

phpmyadmin 2.6.4-pl4
MySQL 5.0.24a-community-nt
php 4.4.4


Get "No SQL query!" message through phpmyadmin when I import the .sql file. If I cut and paste out the create table or insert text it works, but that takes forever. If I copy the data files to the data folder everything works in mysql 5.

The sql files I've tried have been from 2-4 mbs. My backup dumps are 80 mbs though and obviously worried about restoring backups. Is there something I missed when upgrading? I pretty much copied off my data, uninstalled mysql 4 and installed mysql 5. Not in strict mode. Dataserver is in another location so can't always go copy the files off manually. Thanks for any help.

Mysql Dump Table Order
How does mysql order the tables in the file that it creates? Is is it by the order the tables were created, by alphabetic order? can I specify an order by giving the table names in the command line?

Read Mysql Dump File?
I am trying to read a mysql dump file that I was given from a mysql dump
file into my mysql server, I am using the following command at the mysql
command line and get the following error:

mysql> items < c:ookingsitems.mtsql
ERROR:
Unknown command ''.
ERROR:
Unknown command 'i'.

Does anyone know what this means?

Mysql Error While Performing A Dump
I successfully imported a mysql database dump on my old server(mysql 5.0.18) to my new server(mysql 5.0.22). But when I run the dump command on the new server, I get an error:

input: mysqldump --password='madeuppassword' --opt bugs > /home/bugzilla/dump.sql
output: mysqldump: Error 2020: Got packet bigger than 'max_allowed_packet' bytes when dumping table `attach_data` at row: 725

I've tried :
1. run mysqlcheck (no errors)
2. Modify /etc/my.cnf by adding "max_allowed_packet=1024M" under [mysqld]
3. Modifying /etc/my.cnf by adding "ulimit -d 256000" under [mysqld_safe]

but I'm still unable to create a dump file. Do you have any suggestions that may overcome this problem?

Archived Dump Of MySQL Database
We are planning on moving to a different server and was wondering if
there was a way to make an archived dump of the database?

Mysql Dump And Lock Tables
I am getting different results using mysqldump between versions.

The only option I am specifying is --no-create-info

Using Mysql 4.1.12a-nt I get no lock table commands and each row is a separate insert statement, as I would expect.

Using 4.1.18-nt I get lock table commands and all rows are inserted as a single insert statement (per table). How can I turn the lock table output off, is this something that is specified as a default somewhere ?

Archived Dump Of MySQL Database
We are planning on moving to a different server and was wondering if
there was a way to make an archived dump of the database?

Read Mysql Dump File?
I am trying to read a mysql dump file that I was given from a mysql dump
file into my mysql server, I am using the following command at the mysql
command line and get the following error:

mysql> items < c:ookingsitems.mtsql
ERROR:
Unknown command ''.
ERROR:
Unknown command 'i'.

Does anyone know what this means?

MySQL Dump Not Working Correctly
I have a table in MySQL. nightly, the table is dumped (structure and data) and imported into a different database. it has been working fine like that for 3+ yrs. I recently added a new column. i populated it w/ values. the rest of the dump goes correctly, but no matter what, it will not dump this column's values.
in the dump it will just show empty braces.

The columns structure is set to DEFAULT NULL VARCHAR(50). I know im probably missing something, im not a database expert by any stretch.

MySQL Dump Is Not Allowing Application To Run
I am creating a backup once per day automatically. The current size of the file is around 4.1 Gig uncompressed. The command that I use is as follows:
mysqldump --opt -q -R -u username-p'passwd' dbname | gzip > /filepath/$(date +%F).sql.gz

This takes around 25 - 30 minutes to fully backup the database. The problem that I have seen is that while this backup is occurring I cannot access my JBoss application. Oddly enough, I tried to access the database directly and everything is working fine, but any other remote user cannot access the database.

I want to know a couple of things:
1) Is my backup command optimized or is there something else I can add to make it faster. Now I do need to backup the data, table structure, stored procedures, etc.
2) How can I conduct a backup that is more efficient where it does not interfere with the remote users?

Import Of Old MySQL Dump With Same Names
I dumped mySQL to a file, and want to IMPORT it to a new location (other host.
I have the mySQL db already and it have the same fields/names in it, but I want to import the old ones (use them instead, because it contains text and info)

When I run the RUn Quierys in mySQLAdmin I get error: allredy exist.
Do I have to delete the existing first? how do I empty it then?

MySQL Syntax Error When Importing From A .sql Dump
I'm attempting to install JForum on my local server (WinXP Pro). I'm running MySQL Community Server 5.1.23

When attempting to import from a .sql dump, I receive the following syntax error. This error has been produced through JForum's installation wizard, SQLyog and the MySQL CLI. The error is as follows: Code:

MySql Hangs When Building/piping From A Dump.
I'm trying to update my local copy of a live database to match a recent dump: Here's what I'm doing, in Windows XP, (from command prompt):

-----
cmd> mysql --user=myuser --password=mypassword
mysql> drop database mydb;
mysql> create database mydb;
mysql> use mydb;
mysql> exit
cmd> mysql --user=myuser --password=mypassword mydb < backup.sql
-----

The query hangs at the 32nd table, which has about 57000 rows with blobs of up to about 9kb. <- I presume this is part of the problem...

I have tried everything I can think of, including reinstalling mySql server and query browser. I have also added the following line into my my.ini file, which is definately the one that is read, I have checked: (in the [mysqld] section)

max_heap_table_size=1073741824

I'm really confused, as up until last week I was able to build my database from a backup with no problems, even through an Ant build with Eclipse.

MySql: Select Database And Perform Mysql Dump
I currently have a batch file created using shell which runs mysqldump and saves the information to a file. However, I was wondering if there would be a way to use a recordset instead to select the database and initiate the mysql dump.

Ideally this is what i would like to have:
rs.Open "Use database mysqldump  > C:", conn, 3, 3

Does anyone know if this is possible?

Mysql 5 Dump Compatible With Mysql 4.1?
I need to go from mysql 5 back to mysql 4.1 but i noticed that i couldn't use the same tables when i actually put it back, so just wondering if i use a mysqldump file run under mysql 5 will that work when i go back to mysql 4.1 or will i need to do a table by table sql dump of the contents?

MySQL On Windows
I downloaded and installed MySQL for Windows this morning, V4.1. =
Unzipped, installed and started the server as a service, no problems. =
Installed the ODBC driver. A-OK

But, the DOC tells me I have to run "mysql_install_db.sh". So, the =
question is, how am I supposed to run shell scripts on Windows?

Mysql 4.0.20a For Windows
i installed just a few days ago the new my sql 4.0.20a server on a Windows Machine

and heart about that the feature "auto_increment = default value" will work now

now i created a new table added some fields and one field shoud be auto_increment and shoud have a default value (which means, mysql shoud then auto_increment up from the given value), but this doesn't work

i can only choose between default value or auto_increment but not both any ideas ?

MySQL 4 And Windows XP
I am having problems running mysql 4 on windows xp. Mysql 3 works fine.
However version 4 won't run. Even if I start the server with the admin panel
it shuts down again after a couple of seconds. This has only been a problem
since I wiped my hard drive and did a clean install of everything.

MySQL 5.0 On Windows 98 SE
I just downloaded MySQL 5.0 and installed it on a machine that I just did a fresh install of Windows 98 Second Edition on.

The install seemed to go smoothly, and when it was done I try to start mysqld from the command line and get this:

C:Program FilesMySQLMySQL Server 5.0in>mysqld --console
051125 21:04:07 [ERROR] Can't find messagefile 'C:Program FilesMySQLMySQL Ser
ver 5.0shareenglisherrmsg.sys'
051125 21:04:07 [ERROR] Aborting

Also, when I look in the above referenced directory, the file errmsg.sys is there: Code:

Mysql On IIS Windows
I very new to mysql. I would like to get some advise on which release i should install in my windows 2000 server using IIS.

MYSQL In Windows XP Pro Sp2
i get a ERROR 0 when loading the program into my computer. and the servise could not be started, if i go into cmd and type "Net start MYSQL" it says sucsessfull

but when i go into Contrl panel > Administrtor tools > Servise's and click MYSQL it says "error 1067 could be be started"

Can I Use MySQL With A Mac And Windows
I need to share a MySQL database with a guy that uses a Mac, but I don't know anything about the Mac environment. I use WinXP. He has a server that has MySQL loaded on it. I want to create the database, then both of us want to be able to access it or make changes to it via the web.

What type of products do I need? I figure a good MySQL reference book is a necessity. Is there some type of front end application that he can run. I think I can run Access as a front end once it is set up properly. Am I making sense?

MySQL 4 And Windows XP
I am having problems running mysql 4 on windows xp. Mysql 3 works fine.
However version 4 won't run.

Even if I start the server with the admin panel
it shuts down again after a couple of seconds. This has only been a problem
since I wiped my hard drive and did a clean install of everything.

MySQL On Windows
I downloaded and installed MySQL for Windows this morning, V4.1. =
Unzipped, installed and started the server as a service, no problems. =
Installed the ODBC driver. A-OK

But, the DOC tells me I have to run "mysql_install_db.sh". So, the =
question is, how am I supposed to run shell scripts on Windows?.tw

MySQL On Windows
when i try to install mysql on my pc it works just fine until i'm near the end of the installation, the installer writes:

the security settings could not be applied
error number 2003
can't connect to mysql server on 'localhost' (10061)

i have disable my firewall... so whats the problem then..? please make an easy explanation... i'm not that good at english so i hope that you understand me...

Mysql On A Windows Box
there are two options for mysql when it comes to windows...there is a 'windows essentials' and then there is the normal download.
the documentation says the essentials package, (it's almost half the size) is the recommended one because it has all that is needed.
i don't really care if i download the biggest file size, but if i don't need to, i'll take the smaller package.

Upgrading MySQL On Windows/IIS- Help?
I am running MysQL Version 3.23.49 on a Windows IIS machine. I need to upgrade it to at least 4.0.16 (to install vBulletin 3.6).

Is there a good tutorial on how to do this? I look at the documentation on the MySQL site but I'm hoping there is more out there to help me.

As well, the docs say instead of upgrading to V5 I should upgrade to V4 instead. I'd like to have the most up to date MySQL if I can so I won't have to do the another upgrade for a while.

Mysql, Linux Or Windows?
Does mysql work on windows or it has to be on linux only?

MySQL / Windows XP SP2 Incompatibility
I've been posting the problem earlier on Microsoft newsgroups (cannot use support, because of using OEM Windows):

Windows XP SP2 Security Center stops recognizing antivirus and firewall software when I install MySQL server and GUI tools (MySQL Administrator and MySQL Query Browser).

The only way to make the Security Center recognize the software again is to restart it using Services snap-in.

Is it a bug on Microsoft side or on MySQL team side? Are there any solutions for the problem?

Configuration:
Intel Celeron 1200 MHz / 512 MB RAM
Windows XP Home Edition with Service Pack 2
MySQL 4.1 with the latest versions of GUI tools

Cannot Get MYSQL To Start In Windows
Here are some of the errors I receive when trying to start mysql under windows xp home edition:

When I goto mysql command line client the client start but If I hit a button it shuts down.

When I type this:
C:>"C:Program FilesMySQLMySQL Server 5.0inmysql" test
ERROR 2013 (HY000): Lost connection to MySQL server during query

Or I try this:
C:>"C:Program FilesMySQLMySQL Server 5.0inmysqld" --console
060323 12:18:24 InnoDB: Operating system error number 32 in a file operation.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/mysql/en/Operating_System_error_codes.html
InnoDB: File name .ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
C:>

Also while trying to install I cannot get the security setting to go thru, it give me the error 2013, lost server during query, I've tried to shut off my firewall and still the same, given access to port 3306 and still nothing.


Copyright © 2005-08 www.BigResource.com, All rights reserved