Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-22-2007, 01:27 AM   #1
Bro Media - BANNED FOR LIFE
MOBILE PORN: IMOBILEPORN
 
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
execute sql file in php?

I've been trying to get this to work for a long fucking time and its pissing me off, anyone have an idea how to beable to take a sql dump from phpmyadmin, and just run it via a local php script, not phpmyadmin and make it work just the same?
Bro Media - BANNED FOR LIFE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-22-2007, 12:56 PM   #2
Bro Media - BANNED FOR LIFE
MOBILE PORN: IMOBILEPORN
 
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
nobody knows?
Bro Media - BANNED FOR LIFE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-22-2007, 01:12 PM   #3
nicedreams
Confirmed User
 
Industry Role:
Join Date: Apr 2004
Location: Metro DC Area
Posts: 298
Look at this:

php-mysql-tutorial.com/perform-mysql-backup-php.php

Jimmy
__________________

Nice Dreams Cash
http://www.nicedreamscash.com
nicedreams is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-22-2007, 01:25 PM   #4
Bro Media - BANNED FOR LIFE
MOBILE PORN: IMOBILEPORN
 
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
Quote:
Originally Posted by nicedreams View Post
Look at this:

php-mysql-tutorial.com/perform-mysql-backup-php.php

Jimmy
that works to an extent i just keep getting this

"Table 'wpjm.wp_comments' doesn't exist"

because there is nothing in the table, so how can i do it with a blank database?
Bro Media - BANNED FOR LIFE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-22-2007, 01:43 PM   #5
SCORE Ralph
Confirmed User
 
SCORE Ralph's Avatar
 
Industry Role:
Join Date: Mar 2003
Location: Miami, FL
Posts: 2,090
If there is nothing on the table, what is it you're trying to dump?
__________________
GetSCORECash.com | In the Biz Since 1991
Big Tits | Granny & MILFs | Amateurs | Big Booty | Foot Fetish | BBW | Teens
Hosted Embeds | MP4s | RSS Feeds | FHGs | Model Directory
SCORE Ralph is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-22-2007, 02:55 PM   #6
Bro Media - BANNED FOR LIFE
MOBILE PORN: IMOBILEPORN
 
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
trying to dump a sql file to create tables and shit
Bro Media - BANNED FOR LIFE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-22-2007, 03:21 PM   #7
2012
So Fucking What
 
2012's Avatar
 
Industry Role:
Join Date: Jul 2006
Posts: 17,189
Quote:
Originally Posted by Jaysin View Post
that works to an extent i just keep getting this

"Table 'wpjm.wp_comments' doesn't exist"

because there is nothing in the table, so how can i do it with a blank database?
i know this sounds really fucking dumb but ...
whatever you're using is missing that step.

You need to create the table before you can populate it.

Create Table ...
insert into ....
__________________
best host: Webair | best sponsor: Kink | best coder: 688218966 | Go Fuck Yourself
2012 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-22-2007, 04:46 PM   #8
Chariott
Confirmed User
 
Join Date: Nov 2006
Location: http://UUGallery.com http://UUGallery.com http://UUGallery.com http://UUGallery.com http://UUGallery.com http://UUGallery.com
Posts: 361
Not sure I understand it completely but which SQL file would you like to get executed? If you have a large dump and phpmyadmin just halts, it is much better to use mysqldump via ssh and direct its output to a file. Such as:

/usr/local/bin/mysqldump --all-databases --user=NAME --password=PASS > my-dump.sql

You can simply import this dump.sql (which is full of queries) into mysql later again using /usr/local/bin/mysql utility.

I hope this will help
__________________

UUGallery v3.37 builder plugin for Wordpress!
Now it builds FLV VIDEO Galleries! It grabs galleries from FHG's, generates thumbnails, resizes originals,
arranges within your template and posts a gallery within 1 click!
Start making money right now!
ICQ# 475-719-552, Email+MSN: msnaddress[-~at~-]uusoftware.com
Chariott is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-22-2007, 05:41 PM   #9
latinasscash
Registered User
 
Join Date: Jul 2005
Location: Rio de Janeiro
Posts: 95
It sounds to me like when you are doing your database
dump, you are not using the create table option. That
way or a load/restore, it will create the tables if they
do not already exist.
__________________
____________________________________________

Hot All Latin Content...
Recurring Partnership Program...
Content and tours that convert and retain members...
latinasscash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-23-2007, 10:44 AM   #10
Bro Media - BANNED FOR LIFE
MOBILE PORN: IMOBILEPORN
 
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
well, the first line in the sql dump is "CREATE TABLE `wp_comments`"

so i guess it works, but the command in that example requires you to set a table to dump to, which i had to set it to something thats not there due to having no tables in the database

pretty much what im trying to do is make a script that all i give is mysql login info, a database name, and it will do what the sql file says, which is a bunch of create tables and insert into tables, the sql file is a mysql dump from wordpress
Bro Media - BANNED FOR LIFE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.