Ubuntu: How to connect .sql file to MySQL Server to work with application server


I have an information system programmed using XAMPP. It has a .sql file, in which I'm sure it is a database file. I used Ubuntu Server and installed LAMP on it. I put the info. system in the server and I can successfully access its index.php web page using another computer on the same network.

The problem is, on the login page, whenever I enter the given username and password, it doesn't react at all. I'm very sure that there is still a need for me to configure the database aspect of the server. Maybe there is a need for the to import the .sql file to MySQL server, but I don't know how. Please help me.


A .sql is a text file. more {file}.sql will show you the contents and instructions that will be executed if you feed MySQL the file.

You do that with ...

mysql -u {user} -p {database} < {file}.sql  

Careful though. This will add the file contents to {database} and can potentially kill your database. Therefor first examine the file and see what is in it. If unsure add snippets of it to your question (delete sensitive content ;) )

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »