|
Joined: Jun 2006
Posts: 197
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 197 |
I have my database in 6.5x in one server. I want to recreate this database in a new server, before migrate to the version 7.1 What I did was I create a backup from all tables on 6.4 Download it to my PC opeh phpMyAdmin on the new server and try to import the files to my new server to a new database. The problem is that many files are bigger then the mysql file limit and will not import. How go to around of that? Files like post, users, messages, etc. are on the Giga sizes, so what other option I would have to import it? Thank you
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
My recommendation is to not use a PHP script (PHPMyAdmin) to create or import databases; instead use MySQL from the command line (as utilizng the webserver to import/export you'll be at the mercy of the max size limits)
Commands: MySQL Export: mysqldump -uuser -ppass database_name > dump_name.sql MySQL Import: mysql -h localhost -uuser -ppass database_name < dump_name.sql
|
|
|
|
Joined: Jun 2006
Posts: 197
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 197 |
Commands: MySQL Export: mysqldump -uuser -ppass database_name > dump_name.sql MySQL Import: mysql -h localhost -uuser -ppass database_name < dump_name.sql sounds a good idea... So I replace the -uuser with -ehm and -ppass with -xxxx or -uuser with -uehm and -ppass with -pxxx ?
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
no, -u[username] -p[password]
-u -p -h etc are required, they tell the system that you're using a username, password, host, etc
|
|
|
|
Joined: Jun 2006
Posts: 3,837
Carpal Tunnel
|
Carpal Tunnel
Joined: Jun 2006
Posts: 3,837 |
The above method works fine - tried and tested
|
|
|
|
Joined: Jun 2006
Posts: 197
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 197 |
Gizmo, sorry. I'm totally rookie with mysql+php... Would you mind to help me a little more? This is what I have: my mysql server name = libra.SQLserver.com my username = elton my password = river50 (no, it's not the real one ) my database name = myserver_ubbimigrar then the location of my file is on my server (not on teh SQLserver), under /foruns/backup2/w3t_address.sql (for example) How can I construct this line, to run using phpmyadmin It should be a very basic question, but honest I have no clue...
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
MySQL Import: mysql -h libra.SQLserver.com -uelton -priver50 myserver_ubbimigrar < /foruns/backup2/w3t_address.sql
|
|
|
|
Joined: Jun 2006
Posts: 197
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 197 |
still getting error:
SQL query: mysql - h libra.sqlServer.net - uadmin - priver99 sqlad_ubbimigrar & lt;
/ foruns / backup2 / w3t_Banned.sql MySQL said: #1064 - 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 'mysql -h libra.sqlServer.net - uadmin - priver99 sqlad_ubbimigrar
note that the < signal was changed to & lt;
sorry ...
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
The < needs to be a < and not its ascii varient.
|
|
|
|
Joined: Jun 2006
Posts: 197
enthusiast
|
enthusiast
Joined: Jun 2006
Posts: 197 |
Gizmo, on the input window I'm typing the < , but when the error message displays, it shows the ascii code. I'm not sure if that has something to do withe the problem...
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
You're doing this from an SSH/Telnet session yes? If not, this string isn't meant to be ran through a web script.
|
|
|
|
Joined: Jun 2006
Posts: 3,837
Carpal Tunnel
|
Carpal Tunnel
Joined: Jun 2006
Posts: 3,837 |
run this from the command line and not from within mysql (that looks like what you are doing)
also it is probably forums and not foruns if you cut and pasted
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
True, I didn't figure he'd run it from the MySQL command line; seeing as I didn't say to do that lol... But it should just be ran form the Linux command line.
|
|
|
|
Joined: Jun 2006
Posts: 3,837
Carpal Tunnel
|
Carpal Tunnel
Joined: Jun 2006
Posts: 3,837 |
it was the ; that gave me the clue
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
'eh I didn't even bother thinking of that, since I never mentioned logging into MySQL lol
|
|
|
1 members (Ruben),
800
guests, and
174
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|