Jump to content

Recommended Posts

Posted

Right, I have a problem - I'm in the midst of building a shop site for someone based on php and mysql

I want to build it offline so am using Apache, Mysql and PHP

PHP and Apache are qorking fine,

MySql works fine through the command prompt

but I get NO joy when trying to get MySql to run a .sql from the command prompt if I tell it to look at localhost eg

"mysql -h localhost -u user -D database -p < myfile.sql"

and I can't get mysql to work at all when trying to access it with php through localhost - I mean when I run a php script from localhost eg http://localhost/script.php

As the elements work fine on their own, I can't understand what's going on. have I missed an alteration in a conf or ini file somehwere?

Like I said, through windows comand prompt MySql works fine so long as I make no reference to localhost. I can create users, databases, tables and I can insert data into tables and call said data in a number of exciting and informative ways, but only through command prompt which is close to no use to me when I am trying to build a database driven website

Please someone give me some advice

:blink:

I'd be grateful of any help


Posted

You are an absolute life saver

the app you suggested works a treat and I am now able to get on and build the site off line

cheers

much appreciated :D

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...