What is a .sql file? How can I create it? What is the use of such a file?

I have written a php/msql based app and emailed it to my client who’s webmaster wants me to provide him with a .sql file so he can install the app on his server. I don’t know how to go about this or what this means. Any inputs?

Installing an app involves more than an “.sql” file.

But if there is data then a way to import it is important.

Have you tried creating an export file?
Have you tried using it to import?

What is the purpose of this file? I have asked them to create a database and enter the username and password for it in the db.php file after which the tables would be created automatically. Then they can start uploading information. But the ‘webmaster’ wants a .sql file ‘without which he will not be able to do anything’. This is new to me and I do not know what that means.

It should be the storage file format for MySQL, much in the way Word uses .doc, or Excel uses .xls. If your app is creating the MySQL tables, then I’m not sure why they’d need a .sql file, unless they’re looking for some sample data. Otherwise, they’d be able to export their own data into a .sql file (as a backup maybe?).

1 Like

This is a simple plain text file with SQL queries listed inside.
They’re also called “dumps”.
These files used when you want to transfer database from one server to another.
Sample .sql file

I guess your webmaster just didn’t understand that your script creates all database tables automatically.
So he thinks he have to create them manually, using queries in some .sql file.

1 Like

Have you explained to the host master that application code contains a automated install process that create the database schema given a connection to an existing database for a user with the adequate permissions to execute those types of queries. Perhaps the host doesn’t allow the client to run schema altering commands from the application?

Quite possible as the issue is now dead. The client will persist with the current static layout.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.