Hi
How can I transfer some tables created in a database in MySql on my computer to a friend's computer. I have sent to my friend the tables stored in C:\ProgramData\MySQL\MySQL Server 5.1\data\mydatabase folder via email. But when it is pasted in the same location in another computer, it isn't working properly. The table name is listed on the issue of a

Show tables;

command but the fields are empty and an error message is given on the command

Select * from <tablename>;

. Please advice me
Thanks in advance.

Recommended Answers

All 4 Replies

You can use the mysqldump command on your PC to export all data to a .sql file. Send this to your friend. He can import this using the mysql command.

You can use the mysqldump command on your PC to export all data to a .sql file. Send this to your friend. He can import this using the mysql command.

I have tried using this mysqldump command but it always shows errors. I'm not sure what am i doing wrong.
I've tried in all forms of syntax but it is not working.
I tried this command

mysqldump test>t1.sql

(where test is the database name). I also tried other forms of the command such as

mysqldump -uUSERNAME -pPASSWORD test>t1.sql

but it did not work.
Please someone give me the exact syntax to backup me database.

What are the errors ? The second example you gave should be correct.

I don't know what you have installed, but you can also use a tool like phpMyAdmin to export/import the data.

Cant you just use the export tool in myPHPadmin? I think you can export tables to a variety of formats including text files and Access databases.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.