[web] Installing PHP + MySQL on Apache

Started by
14 comments, last by Evil Steve 19 years, 7 months ago
Yay! Fixed it. It appears that the docs are wrong. It ignores C:\WINNT\php.ini. Putting the ini file in C:\php\php.ini works perfectly.

Thanks all
Advertisement
No problems, glad I could help Steve
For future reference, the manual explains the places that the system will look for the php.ini file. It can be in the apache install directory (usually apache/apache2 with the newer apache versions [i.e. one directory up from htdocs]), the system root, and one other place I recall.
Yeah, it also said it could be in C:\WINNT - But that seems to be wrong...


Ok, new question, which is stupidly simple, so I won't create a new thread; How do I import a file into MySQL?
I exported all my databases using php-My-Admin, but it doesn't appear to have a way to import the data it exported (which is useful). I have a file (localhost.sql), with a load of statements like:
CREATE DATABASE `comic`;USE comic;CREATE TABLE `characters` (  `name` varchar(20) NOT NULL default '',  `desc` text NOT NULL,  PRIMARY KEY  (`name`)) TYPE=MyISAM;

I've had a look through the MySQL documentation, and the only way I can find to import data is a table at a time. And since I have around 100 tables in total, that'd just be silly. I remember that in Oracle there was a way to goto the console and type "@localhost.sql" or something like that, and it'd just execute all the statements in the file.

Is there a similar method for MySQL?

Cheers,
Steve
i don't know the answer to your question .. but realize you are talking about TWO different things ...

Loading data files into the database

and

Executing SQL scripts on the database

Pretty sure mysql supports both, the First one is either thorugh a Load or LoadFile method ... can't remember.

oh wait, found it:

8.3.2 Executing SQL Statements from a Text File

apparently the "source" keyword acts like it does for unix shells. and also the "mysql dbname < filename" syntax is used in many examples to load sample databases in tutorials.
Ah ha! Thats much better - I just have to split it into databases now. Well, it worked for the first database fine.

Cheers,
Steve

This topic is closed to new replies.

Advertisement