DelphiFAQ Home Search:

How to run a *.sql script (mysql)


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


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?


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


You are on page 1 of 2, other pages: [1] 2
2009-09-30, 10:33:26
anonymous from United States  
END, 'DD-MON-YYYY') last_weekdate
2009-11-24, 03:04:43
anonymous from United Kingdom  
You can use following commands at your mysql> prompt:

mysql> source file_name.sql
mysql> \. file_name.sql

of course you must either select database in the .sql file or you must 'use' the database first before running a script.

2010-03-28, 09:14:58
CREATE TABLE `users` (
`id` int(3) NOT NULL auto_increment,
`login` varchar(8) default NULL,
`password` varchar(8) default NULL,
2010-03-31, 21:24:21
anonymous from Bangladesh  
how to find if the attribute contains any value by sql querry
2010-04-22, 11:25:58
from Sri Lanka  
2010-05-20, 23:38:15
online01 from India  
Work as a Part timer or Full timer from your Home/Cafe/Office. Work at Home Data Entry positions now being offered for all . You will need a computer with Email access, little typing skills,
Call: 0124-4221618, Posted Id-831125P
2010-05-21, 00:43:37
Data Typing Job
You will need a computer with Email access, little typing skills, a valid Email address, an Internet connection & basic internet knowledge. More details:- Visit- Call: 0124-4221618, Posted Id-831124P
2011-12-20, 02:54:28
The photos are not real and she is a very bad scammer. The adress from where she is working is most Philippinen.

2012-01-09, 00:29:26   (updated: 2012-01-09, 00:30:15)
thanks , its work for me
2012-03-13, 23:52:09

2012-06-05, 14:47:38   (updated: 2012-06-05, 14:48:37)
anonymous from India  
B.TimeStamp as 'Date_Time',
A.name0 as 'Computer Name',
A.user_name0 as 'User Name',
WHEN B.Pointsec_Encryption0 = 'NA' AND B.Bitlocker_Status0 = 'Protection Off' THEN 'Bitlocker - Protection Off'
WHEN B.Pointsec_Encryption0 = 'Drive Not encrypted' AND B.Bitlocker_Status0 = 'NA' THEN 'PointSec - Encryption Off'
Else 'out of scope' End as 'Encryption Status',
B.Machine_Serial_No0 as 'Serial Number',
B.Admin_Access0 as 'System Admins',
B.OSInstall_Date0 as 'OS Install Date',
B.Script_Ver0 as 'Script Version'
JOIN v_r_system A on A.resourceid = B.resourceid
Where Pointsec_Encryption0 = 'Drive Not encrypted'
OR Bitlocker_Status0 = 'Protection Off'
2013-03-22, 00:45:03
anonymous from India  
2013-03-22, 00:45:37
anonymous from India  
2014-10-05, 14:44:40
anonymous from United Kingdom  
Have find a other scammed and she is keeping on asking for money when I don't have that money of 2'035pounds that faith williams to pay it. I'm not paying nothing till if she real coming and she has to the of this month and I send her 530pounds. Just like all the others in Nigeria and Ghana. Now ture people I'm walking away from online dating it's don't work out. When will not be here because when are fake people who ask for money. So don't waste Ur money on the people if when asking for more money.
She from Nigeria again that 3 women now in this country and 1 from Ghana
I'm andrew from England
2014-11-29, 04:42:26   (updated: 2014-11-29, 05:06:32)
anonymous from Birmingham, United Kingdom  
i other one call Faith C Williams in Nigeria just wantend more money and im sick and tired of fake people that promise a futer to be with someone. i had it and from now on no more online on yahoo messenger and now to find a real lady that will not ask for money.. real ladys dont ask for money when fail 3 times to meet up... pay back is a bitch and this is the fake one
her email is
im andrew peter cox from england
my is and im real man with all good

You are on page 1 of 2, other pages: [1] 2



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: