DelphiFAQ Home Search:

How to run a *.sql script (mysql)

 

comments32 comments. Current rating: 1 stars (6 votes). Leave comments and/ or rate it.

Question:

I am installing a .php based tool, and one of the final instructions is to "Run the mysql.sql script to create the necessary tables in the database.". How to I achieve this?

Answer:

The *.sql file is a text file with SQL statements to be executed by the mysql server.

You can run it through a tool like phpMyAdmin - just open a query window there and copy and paste the content of that text file in there. phpMyAdmin and possibly other frontends will also allow to upload a *.sql file through the web browser. In phpMyAdmin click on the SQL tab.

If you don't have any such front end installed, you can also go to the shell (assuming you're on a Linux box here). If your site is hosted somewhere, you'll need putty (or a similar tool) to connect to the server.

Ftp your *.sql file to the (remote) machine if not done yet.

Execute this command and you'll be fine:

mysql <my_db_name> -u<user_name> -p<password> <mysql.sql


Content-type: text/html

Comments:

You are on page 3 of 3, other pages: 1 2 [3]
2015-01-30, 00:33:26
anonymous  
Man Interested Hi, i read your blog from time to time and i own a similar one and i was just wonidreng if you get a lot of spam responses? If so how do you prevent it, any plugin or anything you can advise? I get so much lately it's driving me insane so any help is
2015-02-14, 21:28:48
anonymous from Netherlands  
like delivery http://www.insurersbasic.com worth today culture http://www.equaljus..eforum.org however functions http://thesmallbusi..urance.com confused hearing ca answer http://www.cheaphea..quotes.net contact companies least http://www.quotesfr..surers.com premium me http://chooseautoin..online.com speeds cases even http://accutaneaccutane.com reason too search http://www.insuranc..otesfl.net jumper pieces together http://www.termlife..rquote.com mutual respect operating http://businessinsu..ance.cheap particular goods
You are on page 3 of 3, other pages: 1 2 [3]

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: