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.
View Complete Forum Thread with Replies
Related Forum Messages:
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 Replies !
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?
View Replies !
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.
View Replies !
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.
View Replies !
Table Names On Windows/Unix
My development machine is Windows, while the production machine is Unix. I'll create a table on the Windows machine called "ABCD". I'll name it the same on the Unix machine. However, for some reason, the Windows mysql will rename it to "abcd", I assume because Windows is case insensitive. Of course, when I deploy the app to Unix, it crashes until I go through all my code and rename all database references and xml to "ABCD". Is there a way, on Windows, to make sure it calls the table "ABCD", so when I use my IDE's, it brings the tables in with the proper name?
View Replies !
Case Sensitivity Problems: Windows <-> Unix
I know from the MySQL documentation that Windows in not case sensitive and Unix is but can I force Windows to honour upper and lower case in table names. When writing the mySQL on windows I have used mixed case to help reading table names in my code. This is fine on windows but when I export the mySQL (using phpAdmin) and import it to Unix the tables being all lower case is a problem. So can I force the tables on the Windows machine to allow mixed case?
View Replies !
Sql Dump Import
I'm writing a forum script. so i need an install script. so, it would be easy if i had an sql dump and let the installation import it. it connects to the db ok. I got this off a friend but does not work $fromfile = @file("pb.sql"); if(!$fromfile){ $main = "We could not read the SQL data from pb.sql"; } else { $queries = split("; ", implode("", $fromfile)); foreach($queries as $query){ if(!mysql_query($query)){ echo mysql_error();
View Replies !
Import From Dump Files
I am trying to use a database in my dynamic web page setup but every time I try to restore a particular database in Mysql Administrator, I get the message "The selected file was generated by mysqldump and cannot be restored by this application." I have read countless pages on this forum but even with the syntax generously provided I am still in trouble. I will provide some more detail to ensure I am not at fault with my syntax . My database integrate.sql is in a folder for my downloaded files call it "downloads" My Mysql setup in done in the default manner into the program files... path My test local web site in a "integratewebsites" folder (in the windows default wwwroot folder of my c drive) I want to restore the integrate.sql folder, I assume to the mysql default path (data) and point my web site there so I am not looking to move anything away from default locations. Can anybody help me with a sample command line please?
View Replies !
How To Import Oracle Dump?
I need to convert oracle dump file and import it to MySQl server. I have found some utitlity OraDump-to-MySQL but it is not free and convert only 5 record from each table.
View Replies !
Two Versions Of Mysql On Same Unix Box
I have mysql 3.23.58 version running on my unix box. I installed a new application on it which need mysql version > 4.0 so I thought of having two mysql versions running on the same unix box. I have first installation in /usr/local/mysql and I untared the new version in /var/local/mysql-standard-4.1.18-pc-linux-gnu-i686-glibc23. I am following instructions given in http://dev.mysql.com/doc/refman/4.1/en/multiple-servers.html I also created a empty file and named it as mysql.sock.new and stored it in /var/local. When I try to start this new version from /var/local/mysql-standard-4.1.18-pc-linux-gnu-i686-glibc23 using ./bin/mysqld_safe --datadir=/var/local/mysql-standard-4.1.18-pc-linux-gnu-i686-glibc23/data & it says "A mysqld process already exists". Please tell me where I am going wrong and how to configure it properly?
View Replies !
MySQL Generate UNIX Timestamp
Cam MySQL create a UNIX timestamp during an INSERT? I want to create a timestamp that is the number of seconds since January 1st 1970. Are there any inbuilt functions for doing so?
View Replies !
Calling MySQL In Unix In One Line
I'm running MySQL in Unix and I need to run mysql without ever actually going into mysql. Basically I need to open the database, do what i need to do to the database and exit all in one line of code. If I have to, I could save the sql in a file and go mysql -h localhost -u ______ -p _________ << mysqlcode.txt or something with Unix redirection/piping. However, I'd like to do something more like mysql -h localhost -u _________ -p ________ - (use tempdatabase; select * from test;) Is there anyway to do this. The -e paramater looks like it might do that, but I can't figure out how to use it.
View Replies !
Can't Insert A Unix Timestamp Into Mysql
Just upgraded to 4.1.8 and when I create a field with a date value (field is trdate), it always has default of 0000-00-00. And when I insert values with unix timestamp values (which I prefer, and they come from php's strtotime function),the record does not insert properly. I tried to set, through phpmyadmin, unix/current timestamp and to no avail. If I use a strtotime php function to convert a date into a timestamp, what is the proven way to make sure that value is saved during inserts? I am on the mysql manual, searched this board, but nothing works.
View Replies !
Mysql 5.0 - Using My.cnf - Unix / Slow-query-log
I installed mysql 5.0 and need to set up slow-query-log and other logging options. Here is what I did. But I dont see it working yet. 1. cd /var/db/mysql 2. chown mysql slowquery.log 3. touch /usr/local/etc/my.cnf 4. chown mysql /usr/local/etc/my.cnf vi my.cnf [mysqld_safe] -u mysql --log-slow-queries=/var/db/mysql/slowquery.log so now when I type: mysqladmin shutdown and than mysqld_safe & my sql restarts but the log files are not being used. also - how do I know if my my.cnf is being used at all?
View Replies !
View The Timestamp In MySQL As The UNIX By Adding 0 To The End Of The Row
i've read that in MySQL 4.1, you can view the timestamp in MySQL as the UNIX by adding 0 to the end of the row. Can someone help me modify my code so that this same idea will also in my code? <tr><td colspan="2"> <?php $datetime=$row["time" + 0]; $year = substr( $datetime, 0,4 ); $mon = substr( $datetime, 5,2 ); $day = substr( $datetime, 7,2 ); $hour = substr( $datetime, 9,2 ); $min = substr( $datetime, 11,2 ); $sec = substr( $datetime, 13,2); $orgdate = date("l F dS, Y h:i A", mktime( $hour, $min, $sec, $mon, $day, $year)); ?> <b>Date:</b> <?php echo $datetime; ?></td></tr>
View Replies !
Which Is Faster In MySQL? Comparing Unix Times, Or DATETIMES?
I'm leaning towards using unix times inserted into my MySQL for ease of use in manipulating the data with PHP. I think this will be the final decision, which one would be faster? -- Mysql: * INT (4 bytes) * DATETIME (8 bytes) * TIMESTAMP (4 bytes) -- My PHP application does alot of querying from the database to compare specific data within TIMERANGES, so always, I'm querying with "time >" or "time <". My question is would doing the WHERE time query with the native MySQL DATETIME be faster, than doing a WHERE query with the unix timestamp?
View Replies !
Linux Mysql Nfs : Bind On Unix Socket: Function Not Implemented
I have installed Mysql on red hat ES release 3 and i was working great. For my applications, I decided to to put the data directory on another machine. The other machine is a big disk of storage (Adaptec snap server 1 terabyte) It working great for all applications except Mysql In fact, i put /var/lib/mysql on another machine and I made a nfs mount When i try to start mysql i have this : /etc/rc.d/init.d/mysqld start Timeout error occurred trying to start MySQL Daemon. Starting MySQL: [FAILED] in the error message i have this 051028 11:12:33 mysqld started 051028 11:12:33 Can't start server : Bind on unix socket: Function not implemented 051028 11:12:33 Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ? 051028 11:12:33 Aborting 051028 11:12:33 /usr/libexec/mysqld: Shutdown Complete 051028 11:12:33 mysqld ended I have verified the permission and everything seems to be ok....
View Replies !
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.
View Replies !
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.
View Replies !
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.
View Replies !
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'
View Replies !
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?
View Replies !
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)?
View Replies !
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', ��', Ɔ'); Query: INSERT INTO phpbb_asearch_wordlist (word_text, word_id, word_common) VALUES('françois', ��', Ɔ'); 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?
View Replies !
Mysql Dump Schema
I'm trying to get a hold of MySQL and am trying to dump the schema. This is the command I'm using: mysql> mysqldump -user root -password=rootpass flatland > flatland.dump; And this is the error I'm getting: ERROR 1064 (42000): 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 'mysqldump -user root -password=rootpass flatland > flatland.dump' at line 1 Any suggestions? I'm running the latest version of MySQL.
View Replies !
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:....
View Replies !
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 ?
View Replies !
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?
View Replies !
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?
View Replies !
Dump .csv Data In Mysql Table
hI - I AM A ROOKI IN MYSQL - please help - here is my problem: I intigated PHPLIST - open source marketing mail client for PHP that uses MYSSQL - I have been trying to upload my list of contacts into the client but had no luck or support for PHPLIST - my prroblem is as follows: I created a DB table with 8 rows (ID, first, last, email, address, state, zip, birthdate) - I have 80,000 records in excel spreqadsheet which I saved as .csv and I wish to import / dump the data into the db table) each time I tried to do that I go bunch of errors -- my qustions are as follows: First - anyonme one out there knows anything about phplist or moreless how can I creae a a table that I can move my records to second, when I creae an ID -- I use auto_increment - would that apply when you do data dump using PHPadmin then Run SQL query - paste your csv data you copied from note pad++ - or shall I create my own ID's Please help - I need to send my xmas cards - and invites for our annual party - hey if you are in Chicago you are welcome to join us.
View Replies !
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.
View Replies !
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:
View Replies !
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.
View Replies !
PhpMyAdmin Dump On Local MySQL Administrator/ Query Browser
Ok I give in, I cannot get data obtained from phpMyAdmin into my local database at all! I've tried: - Saving export as .SQL file and restoring using MySQL Administrator but I get a message that the file was not created using MySQL Administrator. - I've tried doing a table with data dump and using that SQL query in MySQL Query Browser but it only inserts a few rows instead of all 1050. What am I doing wrong?? I can't seem to find much info on this particular problem. I want to manipulate data locally instead of over a slow network connection as my queries are getting pretty complex...
View Replies !
|