running a sql file
Moderator: General Moderators
-
psychotomus
- Forum Contributor
- Posts: 487
- Joined: Fri Jul 11, 2003 1:59 am
running a sql file
i have 2 files called mysql_schema.sql and postgres.sql. how can I execute these files??
i believe from the command line
using
or using phpmyadmin for mysql, click on the sql tab, and upload your dump
using
Code: Select all
MySQL> \. /path/to/dump.sqlSet Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
use the mysql command
use the following command :
Dibyendra
Code: Select all
$mysql database_name < /path/to/mysql_schema.sql- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
viewtopic.php?t=46444
where $command and $arguments are what you would use on the command line
or
Read the whole sql file into a variable. Split it on ';' and send each command to the server one at a time.
You might need to do some additional work to remove comments from the sql file.
where $command and $arguments are what you would use on the command line
or
Read the whole sql file into a variable. Split it on ';' and send each command to the server one at a time.
You might need to do some additional work to remove comments from the sql file.
MYSQL ERROR #28
Guys, my code was working just fine, but now it's not.... uhm... the only thing that has changed is I'm adding 3.5 million rows of data (short) into the mysql table....
Is that too much data or why am I getting this error?MYSQL ERROR:Got error 28 from table handler
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: MYSQL ERROR #28
Threadjacking is not cool.Deseree wrote:Guys, my code was working just fine, but now it's not.... uhm... the only thing that has changed is I'm adding 3.5 million rows of data (short) into the mysql table....
Is that too much data or why am I getting this error?MYSQL ERROR:Got error 28 from table handler
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US