Welcome, Guest. Please login or register.
Did you miss your activation email?
05/21/12, 04:37
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  MySQL, PostgreSQL, MS SQL, Access (Moderators: Flash-db, Musicman, Ronald Wernecke, Jorge Solis, Andries Seutens)
| | |-+  HELP!! I am a Mysql installation newbie
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: HELP!! I am a Mysql installation newbie  (Read 2910 times)
flex
Server what's that
*
Posts: 2



View Profile Email
« on: 02/14/02, 22:38 »

Okay,

I have a website and i want to use mysql to store data from my website.  But I do not understand how to install it and run it.    I do not have TELNET access to my site, only FTP access.  What do i do?  Do i need Apache?  Can i install it on my Win 98 Hard Drive and still update the info on my website?  

Please can someone help me

Thanks
Flex
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #1 on: 02/16/02, 15:06 »

Yes - you will need a webserver installed to be able to Use it in conjunction with say PHP - or display the contents of the database on a webpage.  You can run it without having Apache or IIS installed - but it wouldn't make much sense for most applications.  

Their are a couple of packages available that will install everything at once (PHP, mySQL, Apache, Perl) and make it much easier for you.

Their is absolutly no Need for Telnet if your running it on a local machine.  Telnet is only for Unix Based systems - and is like an interface for manageing a remote Unix Server/machine.  

The exact commands that you would use on Unix you can use on a Dos prompt on your local Machine.  

OK - To use in Windows - Find your "mySQL" directory.  Then find a folder called "Bin" within that.  Click on the 'mysql.exe' application - You won't see the extension so it will just be  'mysql'.  And have the application Icon.  

Click on that and then you'll see a prompt like  mysql>  - Then you can use the same exact commands as you would on Telnet under Unix.  Your using the same application so everything is the same - just slightly different context.  It's actually much easier to use on Windows - And their are even a couple of GUI's (Graphical User Interface) out their that you can use if your uncomfortable with the Command line usage.

You should try to use the Command line method as described because you'll understand it more in the future.  
Logged

-Jeff.
flex
Server what's that
*
Posts: 2



View Profile Email
« Reply #2 on: 02/16/02, 16:59 »

First off thank you so much for replying.

Second, OK.  I have everything installed.  And I did execute mysql.  And I did get the command lines and I created a new database with table.


But I still don't get how the info will be displayed/accessed on my exact webpage.  What code do i need to insert/modify in order for me to access the database.  And where do  I need to insert/modify the code (mysql or apache)?

Does it have something to do with grant tables?  Does it have something to do with the PATH?  Where can i find my PATH, username, password, Host, Servername at, so that I can put it in my PERL code for my html pages?

THANKS
FLEX
Logged
Musicman
Administrator
Systems Administrator
*****
Posts: 2685



View Profile WWW Email
« Reply #3 on: 02/16/02, 19:14 »

Hi,

if you get mysql hosted, there - hopefully - is a web front end like phpmyadmin where you can generate and modify your databases. If not, you will likely have to roll your own...
The script allows to create new databases nd set passwords for them (if the host provides multiple data bases Smiley and to create tables in a database, populate them with data and query them. There is also a feature where you can input or upload arbitrary mysql code (like a dump from an existing database).
If your web hosting comes with just a single database, it will have the username and password set already (probably the same as your ftp password)
So the items to change are the database host (may not be the same as the webserver), the user and pass, and the name of the database. Everything related to mysql paths etc. should be done by your hosting company

Musicman
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #4 on: 02/17/02, 14:14 »

If this is on your local machine - you will also need to have a webserver running first. ie  Apache.  Then you'll need either PHP or Perl to communicate with the database.

You will not be able to communicate between your database on your local machine and your website on a hosting service somewhere - Well at least not without quite a bit of experience with this, And even then I'm not really sure if your trying to do this with Win98.

Anyways here's an example of connecting to your database with Perl:  This is also an example of using it on a Unix Machine - This will be extremly difficult if your using Win98 and also using this on your local machine.

The script below is an example of how you may connect to a mySQL database using PERL.  You may also use it to test connectivity to your database.  Remember to substitute your own information as necessary, for your particular database configuration.  The $DBHost variable MUST remain as stated at this point in time in order to connect to the mySQL server.

This script requires permissions of:  755.

#!/usr/bin/perl -w
//This line will change if your using it under windows - This is your path to the Perl.exe file on your computer.

use DBI;
use strict;

my $DBName = "(your database name)";
my $DBUser = "(your database user name)";
my $DBPass = "(your database password)";
my $DBHost = "Your IP - where the mySQL database is located";

my $dsn = "DBI:mysql:$DBName;$DBHost";
my $dbh = DBI->connect($dsn, $DBUser, $DBPass);

if ( !defined $dbh )
{
print "\nDatabase connectionfailed\n\n";
exit;
}
else
{
print "\nConnection to mySQL database successful.\n\n";
}

$dbh->disconnect;



-----------------------

I really don't know if you will be able to run mySQL on your local machine and have it interact with the mySQL database on your Local machine - I don't think it's possible but you can try.

To find out what your UserName and Password are - Click on the mysql icon on your toolbar (It looks like a traffic Light) and will show green if it's running.  Then click 'ShowMe'  - Then Look at the 'my.ini' tab - This will show you your UserName and Password.  You can use these to fill in the necessary info for the script. You can also find a file called  "my.ini" usually in your Windows Directory which will give you this same information.
Logged

-Jeff.
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything