Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *** Importing large SQL files through command line when using PHPMyAdmin/XAMPP
- 1. First, let us say that my Mysql.exe is in D:\xampp\mysql\bin\mysql.exe (I’m using XAMPP by the way) . I’m gonna put my large SQL file in that directory also, meaning the path for the SQL file will be D:\xampp\htdocs\mycode\sql_file.sql
- 2. Create your database in your PhpMyAdmin interface(database name only).
- 3. Run your command prompt(Start -> Run -> then type “cmd”).
- 4. Type this in the command line, assuming that your MySQL installation and the SQL file locations are on the paths I had given in Step 1.
- ---------------------------
- D:\xampp\mysql\bin\mysql.exe -u root -p db_name < D:\xampp\htdocs\mycode\sql_file.sql
- ---------------------------
- where “root” is the username of your database and “db_name” is your database name. After the successful command, you will be asked to enter password, enter your password if it has then press Enter or just press Enter if none.
- 5. Go back to your PHPMyAdmin to check of the SQL dump file has been executed properly.
- (http://www.ryantetek.com/2011/09/importing-large-sql-files-through-command-line-when-using-phpmyadminxampp/)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement