Export/Import MySQL Database
I am writing an application usig PHP/MySQL on my local development box. Now that the app is complete, I am ready to move it into production and live on the domain. What is the best way to go about moving that database from the local MySQL platform onto my hosting?Should I export it into a SQL file and rebuilt it on the host?
View Complete Forum Thread with Replies
Related Forum Messages:
MySQL Export/import
I have installed MySQL on my Linux Mandrake 10 workstation; I didn't change any default values (except for the user-accounts). I used a CMS to create a website which I want to upload to my hosting provider. When I export my database (using PHPMyAdmin) from my workstation to a local file and then on the server (again using PHPMyAdmin) I import the database from the local file, some characters are 'fucked up'. My local install is MySQL 4.1.2-alpha-standard (from Mandrake RPM) and it seems that the default character set is utf8 with collation utf8_general_ci. But some columns in my tables (even within other databases) use collation latin1_swedish_ci (strange..). The server install is MySQL 4.0.15. Using mysqladmin with the 'variables' command, I found out that variable 'character_set' has value 'latin1' and the variable 'character_sets' has value: latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5 The 'convert_character_set' variable seems to have no value. I tried creating a database on the server using mysqladmin with the --default-character-set=utf8, but that also doesn't help. (it doesn't give any error message, but utf8 is not listed in the 'character_sets' variable).
View Replies !
PhpMyAdmin Export -> Mysql Import
I have an mysql database that I can export from phpMyAdmin but I'm having trouble importing it into a local mysql instance. I can export the file as sql (several SQL compatibility modes), but when I try to import it using mysql my_databse_name < exported_php_myadmin_file.sql -u root -p Errors like: ERROR 1062 (23000) at line 45: Duplicate entry '1' for key 1 In phpMyAdmin, if I select the database of interest and then choose "export", I get the "View dump (schema) of database" view. From there I can save the file as any one of several different SQL compatibility modes: NONE, ANSI...MYSQL323, MYSQL40..., TRADITIONAL I tried exporting as several of these that I thought might work, but all fail at the command line import above.
View Replies !
Easiest Way To Export And Import Data From MySQL?
I wonder what is the easiest way to export data in some kind of text file, edit it in text editor and then import back to MySQL? Is there such software? I'm asking this because I need to export one table to text file and give it to tranlsator. Then I need to import it back to MySQL.
View Replies !
Import And Export From MySQL To MySQL
I am having a problem importing data from a csv file. I use PHP admin to create a csv file. I then use the infile on the command line to import the data into an identical table on a different server. One of the fields I try to import is actually a directory of a filename. Example: In csv the field looks like "im est.jpg", when it gets imported it looks like "imtest.jpg"; If I have a field that looks like this in csv "i est.jpg", when it gets imported it looks like. It removes the " " completely. "itest.jpg" Here are the parameters I pass in on the infile. fields terminated by ";" enclosed by '"' escaped by '' lines terminated by ' ' How can I get the load to overlook the that are in the string that I am passing?
View Replies !
Export The Old And Import To The New
I've been hosting a VB board which links into a MySQL database, now I've just gone out and bought 1 years external hosting, all well and good, exported the database from mine and went to run the export to the new database and got syntax errors, I'm guessing this is due to the different version. Code:
View Replies !
Import And Export
i am using mysql 7. i had a friend setup a php and mysql combination for my website. i am now trying to learn how to administrate it. i would like to export the dbs from my prod server, and import on a test server, and view the tables. i believe i have figured out how to export: mysqldump -user -pass dbname > filename.sql, but am having trouble importing to a new mysql installation (possibly because i dont have a db there?) can you please explain how to perform this?
View Replies !
Import Export With Different Versions
I am hosting a WP site locally on my computer, to test it before putting it online, Now I have the hosted WP site online & ready to go, but I am having trouble loading the backup data from my computer into it. When I go to import in the myPHP section, it gives me an error message of: Import failed, You probably tried to load too big a file. But the file is only 350kb! The max is 8Megs! Double checking, it looks like the 2 databases are different versions. Would this be the problem? If so, how do I go about downgrading the version on my computer? And once done, how would I transfer my posts & info onto it?
View Replies !
Import/Export SQL Script
I'm to write an SQL script that can export a database to a file. Then, when onsite, import the database file into a new database. The incremental value that assigns unique id's/keys to different rows in each table must be disabled before importing and then re-enabled afterwards to avoid any discrepancies.
View Replies !
Import / Export Data
I have some .db files containing a lot of data that I want to 'port' to my newly constructed MySQL database. Please advise some hints or suggestion of how to deal with that. Is it possible to export the tables from .db file to csv and import it to my new database?
View Replies !
Import/Export Question
I have a database that has a lot of extra fields that i don't need. My new database has a couple of new fields the old one doesn't have, but I can create default values for those fields with no problem. The question is, is there an easy way to import/export the data without the fields having to match or am I going to have to write custom code?
View Replies !
Export/Import W/myphpadmin
If I wanted to build a database on my localhost, and then transfer it to the remote's host database (using the export/import with myphpadmin), is that possible? or would I have to rebuild the database on the remote server?
View Replies !
Failing To Import An Export From PhpMyAdmin
My hosting company has MySQL 5 and so do I on my local Fedora Core 5 Linux machine. However, when I import a dump file from their enviornment into mine, I get this error ERROR 1064 (42000) at line 21428: 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 'TABLE `EC_SAVED_ORDER_LINE_ITEMS` ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` ' at line 3 This is the line (and those around it) from my file. It is complaining about the first line. What is the problem? Code:
View Replies !
Quick Way To Export & Import Data
I have zero experience with SQL but administer a server that runs multiple MySQL databases. I am looking for a quick way to export a single table from a database, drop a column (or field, not sure how to refer to them) and then re-import it or it's data (thus overwriting) another table that contains all of the same data except for this one column.
View Replies !
Simple Import/export Db Question
I'm moving web hosts today, and I have to move my vbulletin's mysql db as well. I did a database dump using phpmyadmin. I uploaded the .sql file to a temporary area for my host's tech support to import into the new database, but they replied, "Your file has a create database line in it. Please remove that line or export it again without create database checked." I don't see any option in phpmyadmin for create database. I opened up the sql file and I see this: CREATE DATABASE `tkahike_vbulletin` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `tkahike_vbulletin`; Should I leave the "USE 'tkahike_vbulletin' part or delete the whole thing?
View Replies !
Export/import Of Column Names With Space
I am using MySQL 4.0. Say that I have a table named "mytable" having a column "ID" and a column "test columnname". When dumping: mysqldump --opt DATABASE -uUSER -hHOST -pPASS > myfile.txt it gives someting like: CREATE TABLE mytable(ID int(11) NOT NULL, test columnname text NOT NULL); Then I use the mysql command to import myfile.txt in another database: mysql DATABASE -uUSER -hHOST -pPASS < myfile.txt but it fails with: "ERROR 1064 at line 1: 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 'test columnname text NOT NULL)' at line 1" Obviously, the mysql command can't handle column names with spaces. Is this a bug? I would say so - mysqldump should put the column names between quotes or so (alternatively, mysql shouldn't allow spaces in column names). My problem is that I have to work with these columns as they are. They're also referred to from a lot of queries in the API's. Any possible workarounds?
View Replies !
DB Export/import - Problem With Special Chars
I exported a database scheme using PhpMyAdmin (MYSQL40 compatible SQL-file). That worked well. Windows Notepad displayed all the special characters (umlauts [German ones], trademark symbols and so on) correctly. Then I used PhpMyAdmin to import the scheme to a different server. The software imported the sql file without giving any error messages. But all the special characters in the new scheme are broken. It replaced characters like ö (an o with 2 dots on it - HTML entity ö [for users whose browser can't display it]) with ö (two strange chars). I can't find any character set settings in the SQL file. So I think that the server defaults were used. I loggedin at phpMyAdmin with iso-8859-1 as language. Does anybody know this problem? What do I do wrong?
View Replies !
Export MySQL Database To Word Document
This is something I've seen on forums like Invision Power Board, there is an option to save the thread as a document. What I have is a PHP/MySQL system that has contact details for around 2000 people, far too many to have in one print view page. The entries are limited to 100 per page, after a 100 entries the PHP script creates additional pages by calling the next 100 entries with the $_GET function. For the entire thing there's about 20 pages. What i want to do is have a simply link option that can be clicked which pulls all the records from the database and exports them as a Word document which you can save to your desktop and preferrably have the ability to define the formatting of the page within the PHP so you can define what text will be bold how it will be aligned, ow the records will be ordered etc. Does anyone know of a way to do this?
View Replies !
Export Updates Made In Excel Via Odbc To MySql Database?
I recently was able to import a table from MySql into Excel using the ODBC driver and trying a couple different techniques until it worked. I am now wondering if there is a way of exporting changes made in excel so that they are reflected back in the MySQL database. I also got the connection to work in access and am aware that what I am asking can be accomplished by using access in combination with excel, just would like to know if everything can be done in excel.
View Replies !
Import Of Database In Mysql
I get this error when I am importing the database. What am I doing wrong? ERROR 1064 at line 625735: You have an error in your SQL syntax near ' begin_excerpt varchar(250) default NULL, PRIMARY KEY (id) ) TYPE=MyISAM' at line 5
View Replies !
What Database Do You Use To Import Into MySQL
I am setting up a MySQL database and find phpmyadmin very slow to enter data, so I am thinking of importing all the data from Microsoft Access 2003 instead. Or I could create a php page to enter the data. What do you guys use as your main database to import into MySQL?
View Replies !
Import Database From MySQL3.x To MySQL 4.x
I want to import a MySQL 3.x Databse to my new shiny MySQL4.x. I did a backup with /usr/local/mysql-standard-4.0.14-pc-linux-i686/bin/mysqldump -u root -p --opt -A > mysql_lamp_backup.`date '+%Y.%m.%d'`.sql And i tried to import it to MySQL4.x with: /usr/local/mysql/bin/mysql -u root -p < mysqlbak The error: ERROR 1064 at line 598: 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 '-en' at line 1 This is teh line 598: CREATE DATABASE /*!32312 IF NOT EXISTS*/ blabla-en; IF i change the name to blabla_en, it works fine. #### Another issue: ERROR 1064 at line 830: 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 '! ,'poll','Questions','','',10,'r',11.61,11,10,00100 00000010000,'','A'), ANd this 830 line ist just far to long to post it :) So do i have a general problem or what did i do wrong so far? Cheers, Mario -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -------------------------------------------------- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post
View Replies !
Import Old Data To New Mysql Database
My machine was down before, fortunately I have back up the whole /usr/local/mysql directory. Now I have setup a new mysql on a new machine, how can I import the old data back to the new database?? My old mysql version: mysql-3.22.32 new mysql version: mysql-max-4.0.3-beta-sun-solaris2.7.sparc I used to run the mysql like this: /usr/local/mysql/bin/mysql abc should I add the user abc to my new database first? and how?
View Replies !
How Do I Import .csv File Into My Mysql Database?
I woould like to know how to import csv files into my mysql databse, I tried the: LOAD DATA LOCAL INFILE '/importfile.csv' INTO TABLE test_table FIELDS TERMINATED BY ',' LINES TERMINATED BY '' Commands but I dont know where would i put these command and wher do put the "importfile.csv", what directory and location?
View Replies !
Import .xls File Into A Mysql Database
I have a .xls file that i would like to import into a mysql database, I am ok creating the mysql table in phpmyadmin on my webspace but i cant work out or find any useful tutorials on how to import the database from the .xls format and get it into the database short of building a form and submitting by hand which would take far to long.
View Replies !
Import Excel File Into Mysql Database
I was looking for information on how to import an excel file or other text file into a MySql database. I have done this with both access and SQL Server and am looking for a way to do this in MySql. I have several hundred items i want to import into a parts database that is currently in an excel file but can be saved as comma separated or other format.
View Replies !
Import Excel Data Into Mysql Database
I am new to MYSQL..I have a excel sheet with 4 colums and several rows of data.. I need to import all these into a database which i have created in mysql..I tried using LOAD DATA LOCAL INFILE 'D:student.xls' INTO TABLE test.student FIELDS TERMINATED BY ' ' ENCLOSED BY '' ESCAPED BY '' LINES TERMINATED BY ' '; But i get error saying Data truncated at column'x'..
View Replies !
Import A Directory Of Text Files Into A Mysql Database With Php?
I have a directory of text files that i'd like to import into a msql table... I was wondering if there's an easier way to do this with php/mysql, I'd like to avoid copy/pasting the entire directory (thousands of files) into the database if i can. The directory structure of the text files resembles... somepath/A/Aerosmith/Song Name.txt - (extention varies) What i'd like to do is use php to scan the directory and input the file path information and the content from each file into a table like... Dir Artist Song Text Type ------------------------------------------------------------------------ A Aerosmith Song Name Fa La La La La (example text) File Ext B Beatles Song Name Fa La La La La (example text) File Ext
View Replies !
Import Excel Sheet Datas To A Mysql Database
I have a dotnet application in which i have to import data from an excel sheet and store datas in mysql table to display those datas in my dotnet application. Iam using this datas to display datas for generating employee salary slip in my dotnet application. pls do help me with source code in C#.
View Replies !
PhpMyAdmin: Export Table - Import Table
I find in PhpMyAdmin where I can export a table, however when I click the "GO" button where is the exported file? And how do I name it? When I go to import a table I can select the file to import and that makes sense. My goal is to take a table from one database and use it in another database, so I hope I am in the correct place?
View Replies !
Best Options For Database Export
In exporting the data from my live db, I am wondering what would be the best dump options to use. My problem is that I am finding the import on my localhost to be slower than expected. Are their recommended options for the export that I could use in order to make the import quicker?
View Replies !
2 Databases - Export Certain Parts To Another Database
I have a database with all users profile information, but i would like to export ceritain parts into another database, and the layout and colum names in the second database will be differnt. How would i do this on all users, then when a new users signs up, it will happen to them?
View Replies !
PHPmyadmin: Export Database: Tips?
Using PHPmyAdmin, is there any tips one can give me when exporting? I plan on using this data in a Textpattern or Drupal or Similar web app/cms/blog... what would be the best way to export the data for ease of importing into (for example) Textpattern... Drupal maybe?
View Replies !
How To Export Entire Database Via Code?
I have built a custom cms which allows them to export their data, which is fine. However, I want them to be able to export the entire database, including schema, create table statements etc, as a .sql file, in much the same way as phpmyadmin allows you to. However, I want to do it in code (c#), so all they have to do is click a button 'backup database' within the cms and save the .sql somewhere.
View Replies !
Database Import
Well I wanted to xfer the database over to a new site.. so I went to 'export' to save the database and saved it was eqdkp.txt As soon as I did that the old site (where the database was) said "unable to connect to database" .. not sure why, so I went in and ensured my "export" saved all the correct data.. (it did) then I decided it would be best to clear out the databases and import them back thinking that may fix it Well I went to import it and it says Can't create database 'plieber_eqdkp'. Database exists I can not for the life of me figure out how to get it to import back into the database!
View Replies !
Database Recovery And Import
I've been given the job of recovering a database. It's mysql, version unknown but i'd suspect probably 3 maybe 4 certainly not 5. Apparently the host provider where this was didn't set up the backups right, because the guy gave me the db files not database dumps and i am uncertain what to do with them. I'd like to bring them in to a mysql installation and take a look at the data contained. If it's valid i.e. what has been requested i'd like to do a mysqldump on it, then import it in to the guy's database. He says he wants the entry.db which contains three years worth of nonbacked up data. He sent me an archive, one of which is a file entry.db so it appears the files are good, i'm just not sure how to get at them. I've got .db, .db.loc, .idx, and .idx.loc files so it looks like i've got a complete package. Any suggestions?
View Replies !
|