how to upload sql file using command prompt
Posted by: radhikapratapwar (---.mysipl.com)
Date: October 06, 2015 10:06AM

i am trying to import sql file to phpmyadmin but it gives me following errors

mysql> use freesharepointcloud
Database changed
mysql> C:\wamp\bin\mysql\mysql5.6.17\bin\db_test5.sql
Show warnings disabled.
ERROR:
Unknown command '\b'.
ERROR:
Unknown command '\m'.
ERROR:
Unknown command '\m'.
ERROR:
Unknown command '\b'.
->

how to fix these errors on wamp

Options: ReplyQuote
Re: how to upload sql file using command prompt
Posted by: RiggsFolly (92.11.231.---)
Date: October 06, 2015 11:20AM

Hi

The correct syntax for importing an SQL file is

mysql> source C:/wamp/bin/mysql/mysql5.6.17/bin/db_test5.sql

Note the use of the unix `/` and not the Dos `\`


See the manual

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 10/06/2015 11:20AM by RiggsFolly.

Options: ReplyQuote
Re: how to upload sql file using command prompt
Posted by: radhikapratapwar (---.mysipl.com)
Date: October 06, 2015 11:24AM

still it is showing sane error...can you plz provide me step wise procedure to import sql file to phpmyadmin in wamp

Options: ReplyQuote
Re: how to upload sql file using command prompt
Posted by: RiggsFolly (92.11.231.---)
Date: October 06, 2015 11:26AM

Then there is something wrong with the file you are trying to import.

Where and how did that file get generated?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: how to upload sql file using command prompt
Posted by: radhikapratapwar (---.mysipl.com)
Date: October 06, 2015 11:35AM

sql file is dump from live server of my site. i tried to import zip file using phpmyadmin also but it gives me

Fatal error: Out of memory (allocated 562036736) (tried to allocate 506730793 bytes) in C:\wamp\apps\phpmyadmin4.1.14\libraries\import.lib.php on line 345

Options: ReplyQuote
Re: how to upload sql file using command prompt
Posted by: RiggsFolly (92.11.231.---)
Date: October 06, 2015 11:42AM

If the live server was a unix/linux server then the file is probably in unix format i.e. unix line endings.

If this is the problem you will have to convert it to DOS line endings using an editor that understands both unix and DOS line endings. If you dont have a decent editor, try NOTEPAD++, its free and you can convert files easily from/to Dos and Unix formats from a menu item.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 10/06/2015 01:05PM by RiggsFolly.

Options: ReplyQuote


Sorry, only registered users may post in this forum.