View previous topic :: View next topic |
Author |
Message |
luke
Joined: 11 Feb 2007 Location: by the sea
|
Posted: Fri Oct 12, 2012 12:36 am Post subject: |
|
|
|
|
has anyone ever heard of a dump file?
i found some bit of software that was supposed to convert my existing database into a mysql database, and it had some problems and didn't work like it reckoned it should, but in erroring created a dump.sql file
its just a text file full of sql statements, to make all the tables with the proper field types, and then populate those tables with the data from the original database - but i was wondering how i can actually get mysql, through that phpadmin bit i guess, to execute everything in the file?
the file is just like this;
CREATE DATABASE IF NOT EXISTS `db1`;
USE `db1`;
#
# Table structure for table 'Countries'
#
DROP TABLE IF EXISTS `Countries`;
CREATE TABLE `Countries` (
`CountryID` INTEGER NOT NULL AUTO_INCREMENT,
`Country` VARCHAR(255),
`PostageArea` INTEGER,
`PostageSequence` INTEGER DEFAULT 0,
INDEX (`CountryID`),
PRIMARY KEY (`CountryID`)
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;
#
# Dumping data for table 'Countries'
#
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (1, 'Afghanistan', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (2, 'Albania', 2, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (3, 'Algeria', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (4, 'American Samoa', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (5, 'Andorra', 2, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (6, 'Angola', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (7, 'Anguilla', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (8, 'Antarctica', 3, 0);
INSERT INTO `Countries` (`CountryID`, `Country`, `PostageArea`, `PostageSequence`) VALUES (9, 'Antigua', 3, 0);
and on and on for all the data in each table and through all the tables
actually, now i've typed this in, i could probably just write a coldfusion page to execute all this, if i can get the basic database file created and a datasource linking it with coldfusion ... hmmm |
|
Back to top |
|
|
faceless admin
Joined: 25 Apr 2006
|
Posted: Fri Oct 12, 2012 12:54 am Post subject: |
|
|
|
|
ok, that's what I was talking about earlier about everything being in one. You should just be able to install it by clicking on 'import' in myphpadmin.
Make sure you've selected the correct database on the left first though... though you probably don't have more than one |
|
Back to top |
|
|
luke
Joined: 11 Feb 2007 Location: by the sea
|
Posted: Fri Oct 12, 2012 10:33 am Post subject: |
|
|
|
|
many thanks for your help faceless, you're a star!
if you ever need any help with coldfusion, photoshop or anything i know about, let me know!
i think i'm going to learn mysql properly soon, it'll make things easier and more portable for the future |
|
Back to top |
|
|
luke
Joined: 11 Feb 2007 Location: by the sea
|
Posted: Tue Oct 30, 2012 3:53 pm Post subject: |
|
|
|
|
edit - problem solved, and deleted
|
|
Back to top |
|
|
luke
Joined: 11 Feb 2007 Location: by the sea
|
Posted: Tue Oct 30, 2012 4:09 pm Post subject: |
|
|
|
|
problem solved
but now i've posted the above table layout, does that look normal to you mysql people? |
|
Back to top |
|
|
faceless admin
Joined: 25 Apr 2006
|
Posted: Tue Nov 06, 2012 5:34 am Post subject: |
|
|
|
|
Here's an interesting page. I've never used linux, but it explains a lot very clearly.
|
|
Back to top |
|
|
Brown Sauce
Joined: 07 Jan 2007
|
Posted: Tue Nov 06, 2012 1:04 pm Post subject: |
|
|
|
|
you can install oracle virtual box, it's free
https://www.virtualbox.org/
and use that to host a linux or mac or win3.1 os.
If you are doing any work at all it's usefull. The wamp xamp stuff is ok, but you can get much better speeds with linux on this sort of setup.
Learn to use the terminal and it gets quicker ...
I've nearly got the facebook clone together btw. It's a long process part time on ur own |
|
Back to top |
|
|
major.tom Macho Business Donkey Wrestler
Joined: 21 Jan 2007 Location: BC, Canada
|
Posted: Fri Nov 09, 2012 1:52 am Post subject: |
|
|
|
|
Brown Sauce wrote: | I've nearly got the facebook clone together btw. It's a long process part time on ur own |
If this site is intended for couchtrippers, the name AssGroove might suit... |
|
Back to top |
|
|
Brown Sauce
Joined: 07 Jan 2007
|
Posted: Fri Nov 09, 2012 8:54 am Post subject: |
|
|
|
|
I am looking for a name, dunno about assgroove though
if and when it gets going there could always be an assgroove group ... |
|
Back to top |
|
|
luke
Joined: 11 Feb 2007 Location: by the sea
|
Posted: Sat Jan 12, 2013 9:19 pm Post subject: |
|
|
|
|
has anyone done anything, or used anything, to prevent spam being submitted on pages on a site?
i did a site a couple of months back, and the amount of spam they get is crazy - 600 odd in the past week posted on one comments page, and loads being submitted via the contact page that gets emailed to them
would something as simple as select what day it is today stop them? i don't really want to have to use one of the strange image things where you have to work out the characters, and i haven't really got the time at the moment to be coding something decent - i just want something quick and easy, or something i can just plug in! |
|
Back to top |
|
|
faceless admin
Joined: 25 Apr 2006
|
Posted: Sat Jan 12, 2013 10:24 pm Post subject: |
|
|
|
|
the best way for the emails is to make a form page that doesn't show the actual address.
As for the spam, I suggest region blocking if that's practical for the site concerned. If you add a comment system like Disqus' then they do most of the spam filtering for you. though setting the posts to require moderation might be the best answer. |
|
Back to top |
|
|
luke
Joined: 11 Feb 2007 Location: by the sea
|
Posted: Sat Jan 12, 2013 10:37 pm Post subject: |
|
|
|
|
the email page is just a form - the email address isn't shown, but the spam thing just fills in the form and submits it, so it gets emailed
i've just done a quick scan of google for possible solutions, one seems to be adding a hidden text area, the spam system won't know its hidden and will complete it - so if thats filled in its spam. another is checking the time taken to submit the form, a spam system will do it really quick
another possible solution i saw was just asking what fruit beings with a! i might just try something quick and simple like that for now, although i'll have a look at that disqus system when i've got more time |
|
Back to top |
|
|
faceless admin
Joined: 25 Apr 2006
|
Posted: Sat Jan 12, 2013 10:58 pm Post subject: |
|
|
|
|
yeah, with the reg page here I added a question and that really cut down the spammers by a good 95% (it was a mod by someone else that I was able to include).
Disqus is good for sure - I was always worried about using a separate company to store data like that, but it's been around for a few years now and a lot of big sites use it so I reckon it's safe now. |
|
Back to top |
|
|
Brown Sauce
Joined: 07 Jan 2007
|
|
Back to top |
|
|
luke
Joined: 11 Feb 2007 Location: by the sea
|
Posted: Sun Jan 13, 2013 12:21 pm Post subject: |
|
|
|
|
thanks sauce, i have checked that guys site before, but i'd not seen that. i did a google for cold fusion and spam protection and found some coldfusion plugin for the recaptcha image thing but i don't really want to have to go down that image route.
i'll have a proper look at this later, thanks
for now i think i'll go for something simple like this ...
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
Couchtripper - 2005-2015
|