PDA

View Full Version : Need help with MySQL and phpMyAdmin


JJR512
Mon 12th Feb '01, 3:25am
I need some help deciphering some instructions on how to set up a MySQL database. I had my webhost actually create the database, but I think that is as much help as they can provide (since they are the only ones that can actually do that).

These are the instructions that came with a PHP program I downloaded:
myphpPagetool INSTALL
=====================

First, you need to have the apache webserver (other not tested) with
the php4 module nad php4-mysql installed and running, as well as the mysql
database server.

For security reasons apache should be configured in access.conf to allow a
.htaccess override in the admin directory:
--
<Directory /var/www/myphpPagetool/include>
Options Indexes FollowSymLinks
AllowOverride All
order deny,allow
deny from all
</Directory>

and in srm.conf you want to add something like
--
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
--

mysql database access should be configured as follows:

first create the database:
mysqladmin -u <root-user> -p create database <your-database>

then:
( mysql -u <root-user> -p )
--
database->table user:
add: localhost, <www-search>, password
and localhost, <www-admin>, password
with all privileges to 'N'

and
--
database->table db:
add: localhost, <your-database>, <www-admin>, Y,Y,Y,Y
and localhost, <your-database>, <www-search>, Y,Y

<www-search>, <www-admin> and <your-database> can be choosen by you. You
have to set the same values (and password) in the pt_config.inc file in the
admin section!

An example run:

insert into user (Host,User,Password)
values('localhost','www-search',password('mySecret1');
insert into user (Host,User,Password)
values('localhost','www-admin',password('myTopSecret');

and

insert into db (Host,Db,User,Select_priv)
values('localhost','your-database','www-search','Y');
insert into db (Host,Db,User,Select_priv,Insert_priv,Update_priv, Delete_priv)
values('localhost','your-database','www-admin','Y','Y','Y','Y');

-> flush privileges; !!!

Now create the tables, and insert the sample data. You find them in
myphpPagetool/doc/tables-mysql.sql and data-mysql.sql

example:
> mysql -u <root-user> -p your-database < tables-mysql.sql
> mysql -u <root-user> -p your-database < data-mysql.sql


Now install myphpPagetool anywhere in your www tree. I assume in this
example, that you installed in /var/www.
> cd /var/www
> tar xvzf /<path-to-file>/myphpPagetool.tar.gz
> cd myphpPagtool

Now rename/copy index.php.sample to index.php or whatever you like and
wherever you want it to place, but EDIT its contents to reflect the location
of myphpPagetool relative to this index file.

The last is to edit myphpPagetool/include/pt_config.inc to set the required
variables. Now you should be done. Open your browser and direct it to the
index file like: http://your.server/myphpPagetool/index.php or, if you have
installed index.php as the primary index file of your web tree simply:
http://your.server/
If it works: OK.

Click on the admin link in the sidebar, and log in as admin.
USER: admin
PASS: 1234567

BE SHURE TO CHANGE THAT PASSWORD IMMEDIATELY !!!

That's it.

Now the first part about configuring Apache Server, let's not worry about that, since I doubt a commercial web host will reconfigure their server software to suit my needs. So if it works, good, if not, oh well. But I need help with the rest of it, actually making the tables and whatever else it says to do, because I don't understand any of it.

The interface that I have to do this with is the phpMyAdmin software. If I can do it through that, great. If not, I think I can also do it via telnet.

Zecherieh
Mon 12th Feb '01, 4:04am
For one thing those have to be some of the worse written instructions I have ever seen


But yes you can do everything that it tells you to do in phpMyAdmin

JJR512
Mon 12th Feb '01, 4:12am
OK, but could you tell me how to do it? I mean, really make for me a "For Dummies" version of these instructions. Clearly tell me exactly what I should type, where I should type it, and what to click or do after I type it. Write out exactly what I am typing, and tell me what of what I'm typing is a variable that I should replace with my own value, and what those variables represent and what I should substitute for them. I mean, really really spell it all out. Thanks!