Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

moving mysql-data files?!

Status
Not open for further replies.

panza

Programmer
Mar 7, 2000
6
DE
I've moved my database, which is rather large to another machine, which is not on a network&nbsp;&nbsp;but has mysql for win installed. I'm using phpadmin to manage tables and stuff. it shows all table-meta-data, but whenever I try to &quot;browse&quot; through the data of the tables, I get an error from mysql &quot;134&quot;. I couldn't look up this error code anywhere - does anyone know what it means?<br><br>thanks<br>
 
Did you dump out the data properly?&nbsp;&nbsp;You can do this use mysqldump -u [username] -p[password] [database name] &gt; [filename]<br><br>like example <br>mysqldump -u username -ppassword database &gt; database.sql<br><br>The command above will dump the database named database to database.sql.&nbsp;&nbsp;After that you can run your sql command from database.sql.&nbsp;&nbsp;Hope this would help.<br>
 
yes, I got a dump in form of sql-statements. how do I run these (huge) sql-statements to build the new database? mysqlimport doesn't seem to work properly with files...
 
I think mysqlimport is only for importing .CSV (comma-separated values) text files, not SQL statements.<br><br>I'm not sure if it works the same on a Windows system, but in Unix, the contents of your sql statements can be piped in this way:<br><br>mysql -u username -h hostname -p yourdatabase&lt; yourSQLfile.sql<br><br>The -p option will prompt for password before running the script. You can also include the password in plain text as in:<br><br>mysql -u username -h hostname -pPassword yourdatabase&lt; yourSQLfile.sql<br><br>If that doesn't work in Windows, the latest version of phpMyAdmin lets you browse for a SQL file to execute. Failing that, you can even open your whole SQL file in a text editor, highlight and copy to clipboard, and paste into the phpMyAdmin query area. You might also benefit from breaking the files down into smaller chunks.<br><br>P.S. I don't know if by phpadmin in your first post you meant the same thing as phpMyAdmin, but if not, it's pretty much the best web-based admin system for MySQL. Get it at <A HREF=" TARGET="_new"> this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top