How to read a .sql file?

How to read a .sql file?

Postby Enrico Maria Giordano » Tue Sep 04, 2018 8:38 am

Anybody knows how to extract data from a .sql file?

Thank you in advance for any information about the subject.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to read a .sql file?

Postby hmpaquito » Thu Sep 06, 2018 1:26 pm

Hi,

Open HeidiSql app. Connect to server and

Image
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: How to read a .sql file?

Postby Enrico Maria Giordano » Thu Sep 06, 2018 1:44 pm

hmpaquito wrote:Hi,

Open HeidiSql app. Connect to server and


Which server? I have no server, only a .sql file. Could it still be open?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to read a .sql file?

Postby Enrico Maria Giordano » Thu Sep 06, 2018 1:51 pm

I just tried HeidiSql and it starts asking of a SQL server, that I don't have.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to read a .sql file?

Postby hmpaquito » Thu Sep 06, 2018 2:01 pm

Enrico,

Download and install xampp packet from https://www.apachefriends.org/download.html

After start his Mysql server.

Regards
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: How to read a .sql file?

Postby Enrico Maria Giordano » Thu Sep 06, 2018 2:09 pm

Thank you, but I'm searching for a way to extract data from the .sql file programmatically. I can't install anything on the customer's PC.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to read a .sql file?

Postby Rick Lipkin » Fri Sep 07, 2018 1:33 pm

Enrico

I believe .sql files are just text .. try to open your file with notepad ..

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: How to read a .sql file?

Postby Enrico Maria Giordano » Fri Sep 07, 2018 1:42 pm

Rick Lipkin wrote:Enrico

I believe .sql files are just text .. try to open your file with notepad ..


Mine is not text, it's a binary file. I have to ask my customer if that file is encoded or corrupted…

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to read a .sql file?

Postby cnavarro » Sat Sep 08, 2018 2:45 pm

Enrico, is a file of Microsoft SQL Management Studio ?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: How to read a .sql file?

Postby Enrico Maria Giordano » Sat Sep 08, 2018 3:03 pm

My customer said that it's a MySQL file, but I'm not sure at all...

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to read a .sql file?

Postby Antonio Linares » Sun Sep 09, 2018 10:38 am

Enrico,

phpMyAdmin lets you import a SQL file and process it

The file can be inside a ZIP (gzip, bzip2, zip) file

In example, all these forums (MySQL, over ten years) are exported into a single SQL file
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42097
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How to read a .sql file?

Postby Enrico Maria Giordano » Sun Sep 09, 2018 11:34 am

Already tried with phpMyAdmin: no luck.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to read a .sql file?

Postby Antonio Linares » Sun Sep 09, 2018 3:39 pm

Enrico,

HeidySQL is also processing it nicely, have you tried it ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42097
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How to read a .sql file?

Postby Enrico Maria Giordano » Sun Sep 09, 2018 4:18 pm

Yes, please read the first messages of this thread.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to read a .sql file?

Postby ShumingWang » Wed Oct 17, 2018 4:01 am

Some table fields might be binnary data type, restore data to mysql server
mysql.exe -h xxxip -u root -p -C databasename < xxx.sql

Then with anytools like mysql.exe -h xxxip -u root -p can login and browse.
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China


Return to Off Topic / Otros temas

Who is online

Users browsing this forum: No registered users and 4 guests