0

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.

  • Thank you Rinzwind! I am glad I was able to import the database file (.sql) on MySQL Database Server using the given syntax. My next question is that what is my next step to make the imported database file to connect to the apache web server? – user436373 Aug 8 '15 at 10:51
  • Finally resolved this problem on my own! – user436373 Aug 27 '15 at 18:39
2

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 ;) )

  • Thank you Rinzwind! I am glad I was able to import the database file (.sql) on MySQL Database Server using the given syntax. My next question is that what is my next step to make the imported database file to connect to the apache web server? – user436373 Aug 8 '15 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy