Forum Moderators: coopster

Message Too Old, No Replies

php and setting up a mysql db

         

oilman

11:45 pm on Feb 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just downloaded a php script I want to you use and it runs with a mysql db. So log in to my host control panel and setup my db. It gives me an url of db43.myhost.com. The system I'm installing has a script that is supposed to be run on the db to set up the tables. In the install details it says:
Run script 'db.sql' located in the 'scripts' folder on the above-created database. This will create all database tables necessary for the system. Again, if you don't have access to the server, ask somebody who has. The command might look like this: mysql -u john -p < db.sql
However I don't have direct connection to the db like they have in the sample command. How do I do this? (If I can't do it through my control panel I get lost in a hurry :))

amoore

12:06 am on Feb 26, 2003 (gmt 0)

10+ Year Member



While the command may look like
mysql -u john -p < db.sql

In your case it will probably look more like
mysql -h db43.example.com -u john -p databasename < db.sql

See the mysql man page or the docs at mysql.com for more arguments to the mysql command line client.

You can also probably pass the raw SQL to your database through a web-based database manager if you use one.

oilman

12:33 am on Feb 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thanks amoore - that got it