Jump to content


Photo

Import in phpmyadmin .BIN file

import mysql phpmyadmin

  • Please log in to reply
10 replies to this topic

#1 pascal_22

pascal_22

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts

Posted 02 October 2013 - 09:53 AM

Hello to all!!

 

I really have a problem and i can t find any solution on the web.

 

I'M trying to import in mysql database (using phpmyadmin on windows) a .BIN file. but it doesnt work.

I receive this error : 

 MySQL a répondu: Documentation
#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 '
    A?S' at line 1 

Any suggestion?

 

thanks a lot 


Edited by pascal_22, 02 October 2013 - 09:54 AM.


#2 jazzman1

jazzman1

    Advanced Member

  • Gurus
  • 2,678 posts
  • LocationMississauga, Canada

Posted 02 October 2013 - 07:58 PM

What charset encoding are you using to get the binary sting from your DB or something else, for example? Make sure that this binary data is saved into a file under UTF-8 encoding charset without BOM, then try again I thing that's your problem. You can post out this problematic string here for testing purposes if you want it.



#3 pascal_22

pascal_22

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts

Posted 03 October 2013 - 07:09 AM

Hello JAzzman,

 

Thanks for your answer!

 

In fact, since one year, i buy from ip2location a database that locate user from ip..... yesterday, i upgrade to a better database(more information) from ip2location.

 

Usualy, the download has a mysql dump file but this upgrape, only have a .bin file and a .cvs file.

So i thought that the .bin file was the same as mysql dumpfile... but it doesnt work... so i read the help from ip2location and they said that we need to create table and after import .csv file...

 

 

When i try to import .bin file in phpmyadmin.... the char set was utf8!!

The advantage of the dump file, was it automaticly create the table then import row.....

does a .bin file does the same?

Thanks a lot



#4 mac_gyver

mac_gyver

    Advanced Member

  • Administrators
  • 2,607 posts

Posted 03 October 2013 - 07:50 AM

the .bin files are for using the modules/library API code that they provide - http://www.ip2locati.../developers/php


multi-purpose programming fool. well written source-code should be self-documenting. well written code should be self-troubleshooting. 


#5 pascal_22

pascal_22

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts

Posted 03 October 2013 - 12:30 PM

Ho ok!! thanks!! I see now!!!

 

for performance and speed.... should i use the database or a .bin file like this example? http://www.ip2locati.../developers/php

 

 

thanks so much!!!

Pascal



#6 jazzman1

jazzman1

    Advanced Member

  • Gurus
  • 2,678 posts
  • LocationMississauga, Canada

Posted 03 October 2013 - 02:49 PM

for performance and speed.... should i use the database or a .bin file like this example? http://www.ip2locati.../developers/php

 

Yea, it's possible! Check out their docs.



#7 pascal_22

pascal_22

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts

Posted 03 October 2013 - 03:38 PM

Ok thanks!

 

I send a message to their support team... for asking: should i use query the database(php,mysql) or query a .bin file

Which way is the best? i mean for speed,performance,less cpu usage, less memory usage....?

 

Thanks!


Edited by pascal_22, 03 October 2013 - 03:41 PM.


#8 jazzman1

jazzman1

    Advanced Member

  • Gurus
  • 2,678 posts
  • LocationMississauga, Canada

Posted 03 October 2013 - 04:13 PM

Yep, that's a good idea. Mail theme ;) For less cpu and memory usage I'm not sure, since I checked the link provided by mac_gyver, but for speed and performance it would be possible.



#9 pascal_22

pascal_22

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts

Posted 04 October 2013 - 07:28 AM

I receive a short answer ;)

 

 

 

We would recommend you the CSV format.

 

So i'll continu to use it!!!

Thnaks a lot to all your help!!

 

Have a great week end!!!

PAscal



#10 mac_gyver

mac_gyver

    Advanced Member

  • Administrators
  • 2,607 posts

Posted 04 October 2013 - 07:37 AM

in general, having the complied code of a database engine searching for values in data is going to be faster than using interpreted php script for the same task.


multi-purpose programming fool. well written source-code should be self-documenting. well written code should be self-troubleshooting. 


#11 pascal_22

pascal_22

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts

Posted 04 October 2013 - 07:44 AM

You right!!!!

i can test it.... to testing it.. i check the execution time it takes?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com