PDA

View Full Version : MySQL


Adam
10-20-02, 03:15 PM
Hello there,

I read most of the question and answers but I could not find anything simpler I needed. I think I am the last dumbest man in the planet. Could someone be kind to tell me in simple steps how to set up mysql? that is of course, after I order mysql through powweb wich cost £10. I read a lot at www.mysql.com too confusing. I have also downloaded phpmyadmin but still haven't change anything as I am not sure yet.

Ok, anyone there to give me something to start up?

RadioRob
10-20-02, 05:19 PM
Hi Adam!

If you do not have database expierence, or PHP/CGI expierence... mySQL is not going to be easy for you to impliment on your own.

Typically it's used by a CGI or PHP program to store information (such as message boards, image galleries, guest books, etc).

You might want to look at http://www.hotscripts.com and see their PHP section. There are a lot of programs there that use mySQL. That will at least give you an idea of what is possible. You can then either use some of the scripts there or program your own.

In order for me to give you any more advice, I need to know more about what you are wanting to do... for example create a message board, a guest book, or whatever.

Hope that helps.

Adam
10-20-02, 06:42 PM
Thanks for your message
well, my website is about hotels and I would like to build a database in order my visitors to search hotels by name star, town atc. I'll check that link you gave me anyway and see what I can get from it. I will probably come back with more stupid questions. Let me know if you know anything else

Oh by the way, what program I should use to upload php files? I have downloaded Mascon, would that work?

thanks again

RadioRob
10-20-02, 06:48 PM
Pretty much any stand alone FTP program will work. Just make sure you can adjust the permissions (CHMOD) through it.

If you can't find a program to work, try SmartFTP at http://www.smartftp.com. It can handle FTPing files as well as adjusting permissions.

And as always... do holler with any questions. :) That's what we're here for.

Adam
10-20-02, 06:51 PM
Are you tellin me that I can use Dreamweaver? I usually use Dreamweaver.

thanks

RadioRob
10-20-02, 06:54 PM
You "can" use Dreamweaver in most cases for PHP scripts... but I don't recommend it.

Personally I would suggest a seperate FTP program that does only FTP stuff. Dreamweaver can get static pages up just fine... but when it comes to CGI, PL, and PHP scripts, it's not the best solution for ya.

Ya might give SmartFTP a try or any other at download.com. Just make sure you can adjust your CHMOD settings.

Hope that helps.

Adam
10-20-02, 07:00 PM
At least I have the first idea what to use for uploading php files.
Now, if you could give me some ides how would I go and adjust CHMOD setting?

Damn! I have to go to bed soon - work tomorrow early

See if you can give any idea I'll read it tomorrow

Many thanks

RadioRob
10-20-02, 07:02 PM
Adjusting the CHMOD settings are different with each FTP program you use.

With SmartFTP... you simply click on the file you want to adjust permissions for. Then right click on it... and click on CHMOD (Permissions). Type in the setting you want, or use the check box system to set the permission for the script.

Hope that helps. :)

Adam
10-21-02, 06:10 PM
If I order mySQL on powweb would it effect my static site account? I wanted to order earlier but it got me backed off when I saw it says the following: this will change your account. Also, would it be ok if i saved my PHP files within htdocs, I mean by creating a seperate folder withing htdocs?

Please let me know

RadioRob
10-21-02, 06:13 PM
Hi there!

Ordering mySQL will *NOT* effect any existing page on your site. It will not modify any file on your site. So ya should not have any problems there. :)

Once ya order mySQL... make sure to setup a username and password for it. You can do that from OPS > Packages > mySQL. This username and password should be different than your FTP username and password.

And you can place your PHP scripts anywhere you would like within HTDOCS.

Hope that helps.

Adam
10-21-02, 06:58 PM
Hello again,

I was hoping maybe you can help me how how to connect with smartFTP. I am using smartFTP v1.0 build 969. Does this do the job? Where it says yourservername.com I have placed following: cepheid.powweb.com and then "username" and "password" and I still cannot connect, any idea? there shows a Port 21 or do I log in as anonymous

Also, on cnfig.inc.php which looks like this:

$i++;
$cfg['Servers'][$i]['host'] = '';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['pmadb'] = '';
$cfg['Servers'][$i]['bookmarktable'] = '';
$cfg['Servers'][$i]['relation'] = '';
$cfg['Servers'][$i]['table_info'] = '';
$cfg['Servers'][$i]['table_coords'] = '';
$cfg['Servers'][$i]['pdf_pages'] = '';
$cfg['Servers'][$i]['column_comments'] = '';
$cfg['Servers'][$i]['AllowDeny']['order']

and it goes on for ever something similar to the bottom of the page. Do I have to add "hot" "username" and "password" allaway down on each line. I don't know if I am making sense to you

RadioRob
10-21-02, 07:06 PM
Hi!

Enter the following information in to connect to your site:

Address: ftp.yourdomain.com (ie: ftp.stsf.net)
Login: YOURLOGIN
Password: YOURPASSWORD
Port: 21
Anonymous: UNCHECKED

And I'm assuming you are playing around with phpMyAdmin if you see the following... If so... make the following changes.

$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'YOURMYSQLUSERNAME';
$cfg['Servers'][$i]['password'] = 'YOURMSQLPASSWORD';
$cfg['Servers'][$i]['only_db'] = 'YOURMYSQLDATABASENAME';
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['pmadb'] = '';
$cfg['Servers'][$i]['bookmarktable'] = '';
$cfg['Servers'][$i]['relation'] = '';
$cfg['Servers'][$i]['table_info'] = '';
$cfg['Servers'][$i]['table_coords'] = '';
$cfg['Servers'][$i]['pdf_pages'] = '';
$cfg['Servers'][$i]['column_comments'] = '';
$cfg['Servers'][$i]['AllowDeny']['order']

Leave the rest of the of the boxes blank except for:

/**
* Your phpMyAdmin url
*
* Complete the variable below with the full url ie
* http://www.your_web.net/path_to_your_phpMyAdmin_directory/
*
* It must contain characters that are valid for a URL, and the path is
* case sensitive on some Web servers, for example Unix-based servers.
*/
$cfg['PmaAbsoluteUri'] = 'YOURWEBADDRESSTOMYPHPMYADMIN';

The PmaAdboluteUri will look something like http://www.yourdomain.com/your/pathto/phpmyadmin

Good luck! :)

Adam
10-21-02, 07:43 PM
Thanks for quick respond.

what do you mean by http://www.your_web.net/path_to_you...dmin_directory/
my domain is www.justlondonhotels.com/phpmyadmin is that right or does it has to be .net at the end?

Also, yes I am playing around with phpmyadmin and I wonder where this code #!/usr/local/bin/php go. All the following phpmyadmin :

db_details.php
db_printview.php
index.php
ldi_table.php
left.php
main.php
read_dump.php
sql.php
tbl_alter.php
tbl_change.php
tbl_create.php
tbl_dump.php
tbl_indexes.php
tbl_move_copy.php
tbl_printview.php
tbl_properties.php
tbl_qbe.php
tbl_rename.php
tbl_replace.php
tbl_select.php

start with something like this:

<?php
/* $Id: sql.php,v 1.130 2002/09/27 15:15:04 loic1 Exp $ */


/**
* Gets some core libraries
*/
require('./libraries/grab_globals.lib.php');
require('./libraries/common.lib.php');............................etc

Any idea where that code goes and does it has to be altered or be placed as it is?

Many thanks

RadioRob
10-21-02, 07:48 PM
what do you mean by http://www.your_web.net/path_to_you...dmin_directory/
my domain is www.justlondonhotels.com/phpmyadmin is that right or does it has to be .net at the end?

You will want to enter the FULL URL... so... http://www.justlondonhotels.com/phpmyadmin. Don't forget the "http://" part. :)

After you make those changes, you should not have to do anything else. Just save the file and upload it. :)

Good luck!

HalfaBee
10-21-02, 08:01 PM
You don't need the #!/usr/local/bin/php anymore nor do you need to chmod to 755.
The tutorial needs updating.

FYI it goes at the very first line before anything else and has nothing else on the line.
This is now only needed for cron jobs.

HalfaBee

Adam
10-22-02, 10:48 PM
Hello RadioRob,

I was wondering if you have an e-mail or MSN
to check my phmyadmin

RadioRob
10-22-02, 11:01 PM
You can reach me via one of the following means:

E-mail: webmaster@stsf.net
AIM: RobertOnTheAir
MSN: RYates1981@hotmail.com

:)