473,503 Members | 3,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to execute a script in MySQL?

I am renting space on 2 servers. On one server I created a script with
sql's "create table .., insert into...". Now I want to execute this
script on the second server. What is a syntax?
I tried from telnet:
dbname < file.sql
where dbname is a name of my db and file.sql is a script, but I got
message "syntax error".
Any idea why?

Thanks,

Zalek
Jul 20 '05 #1
2 2017
<za********@hotmail.com> wrote in message
I am renting space on 2 servers. On one server I created a script with
sql's "create table .., insert into...". Now I want to execute this
script on the second server. What is a syntax?
I tried from telnet:
dbname < file.sql
where dbname is a name of my db and file.sql is a script, but I got
message "syntax error".
Any idea why?


Check out the 'source' command.
Jul 20 '05 #2
<za********@hotmail.com> wrote in message
I am renting space on 2 servers. On one server I created a script with
sql's "create table .., insert into...". Now I want to execute this
script on the second server. What is a syntax?
I tried from telnet:
dbname < file.sql
where dbname is a name of my db and file.sql is a script, but I got
message "syntax error".
Any idea why?


Check out the 'source' command.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6803
by: Sheila King | last post by:
I have searched for an answer to this question on the comp.lang.python archives at Google Groups, and also looked through the (sparse) MySQLdb documentation, and cannot confirm for a FACT what I...
2
5033
by: Tim Williams | last post by:
I'm trying to write a simple python program to access a MySQL database. I'm having a problem with using MySQLdb to get the results of a SQL command in a cursor. Sometimes the cursor.execute works,...
0
2244
by: Duane Winner | last post by:
Hello all - I'm having a small problem with the mysql startup script that ships with MySQL-3.23.56-1. I'm running on RedHat Linux. It works fine, but I have a backup server that runs a script...
0
444
by: zalekbloom | last post by:
I am renting space on 2 servers. On one server I created a script with sql's "create table .., insert into...". Now I want to execute this script on the second server. What is a syntax? I tried...
8
18710
by: johnlichtenstein | last post by:
I am using cx_Oracle and MySQLdb to pull a lot of data from some tables and I find that the cursor.execute method uses a lot of memory that never gets garbage collected. Using fetchmany instead of...
14
6069
by: mistral | last post by:
Need php script to create mySQL database programmatically; since hosting configuration may not allow create database from script, script also need eliminate/rewrite all restrictions in appropriate...
5
16484
by: loudwinston | last post by:
Hello, I'm encountering a strange error with PDO. The server is FreeBSD 4.4, PHP 5.1.2, mySQL 4.0.20 with 4.1.18 client libs. I have the following code (usernames and passwords changed to...
23
24475
by: ticfranca | last post by:
Hi, I'm getting this error in the code below: sub Pega_recorde { $database = 'bundinha'; $host = 'localhost'; $usuario = 'myhumoradm'; $senha = 'my8xr2d2'; ...
3
4889
by: FNA access | last post by:
Hello all, I am relitivley new to mySQL. I started by downloading from the mySQL site. I then downloaded mySQL administrator and mySQL Query browser. With my set up I got a user root with a...
6
3252
by: kout | last post by:
Hey I've got a mysql query that I'd like to process *only* if a javascript if is true. Is that possible? Something like this: <script language="javascript"> if (condition is true) { <?php...
0
7064
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7315
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7445
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5559
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
369
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.