# Newbie needs MySQL, perl help (Apache's good now)

## Pluto101

Ok, so, here's the situation. I've decided to take on a little project: starting a scoop based weblog. I've gotten my old box up and running w/ Gentoo, XFCE4, Mozilla, etc, and now I'm on to the networking aspect. The scoop site states I need perl, apache 1.3.x (isn't compatible yet with apache 2.0), mod_perl, and MySQL installed beforehand. So, I've emerged all four, in that order. 

Apache seems to be working (when I visit my IP, I get a "you've installed Apache!" site), though I don't know why or how. When I briefly explored working w/ apache on my XP computer, there was a cgi-bin folder which contained the actual site contents. I realize scoop is going to be far more complex than a simple .html file, but it's nice to have an idea of where things are and what's going on. I've heard alot about a httpd.conf file, but all I can see is an /etc/apache/conf/apache.conf & /etc/apache/conf/commonapache.conf. I don't know which does what, or if I need to change anything to get anything compatible, but at least something's going on.

mod_perl and perl I don't know how to test.

MySQL is wacko. I started it(/etc/init.d/mysql start), and it seemed to start, but when I tried to set my password(/usr/bin/mysqladmin -u root -h tux password 'mysqlpassword')(my machine's name is tux), it gave me an error: 

```
/usr/bin/mysqladmin: Unknown command: 'tux'
```

So, my main problem is lack of knowledge, specifically of Linux, Apache, and MySQL. Hell, I barely know what MySQL does (maintains web databases, I think?), much less how it does it, and what I need to do aside from emerge mysql to get it to work. Apache's a little better, but I still don't know what's going on over there. 

My Question: Does anybody know what I need to do? 

And: Where's a good beginner/idiot tutorial, faq, etc. that explains Gentoo w/ apache and MySQL. Concepts, file locations, why mine doesn't have a httpd.conf, etcetera.

Thanks!

----------

## augury

mysql-administrator is good at managing these things.  you probably will log on with out a password but once inside you set one and all the permissions and you can easily create your databases and what not.  it logs on mysqladmin better too then.

the apache files have moved around  /etc/apache/conf/apache.conf and  /etc/apache/conf/httpd.conf are the same file i think.  

mysql is the database server for larger databases.  its the most compliant/compatible of sql servers (for instance when connecting to odbc for interdabase communication).  the databases are kept in /var/lib/mysql.  there is a mysql database that keeps the servers data about users and permissions.  the interface with mysql is done by sql commands (very few and not complicated) and some commands specific to mysql.  connections to mysql are made over network interface (port 3306)  or through a unix socket file in the case of the localhost (unix:/var/run/mysqld/mysqld.sock).  what make a database so great is the way data is keep.  a database has tables, each table sets of data as fields that are associated.  for good databasing the table should have a unique field with an associated value.  the uniqueness permits good backbone crossreferencing in the relational database.  the relations are where the unique singular entries are associated as the plural nature of the modeled data.  The reason for this is trivial to certain extent to us because computers do all the work anyhow but the computer cannot hardly function outside of these means and so it is essential.  for internal computations mysql is too big and slow but it can be used as a bond of many computers and tasks, informations and porpuses.  there neednt nessesarily be relations.  the model should only follow the reality it records.  typically a id field is created in the table which pretty much just numbers the entries and provides a unique key whether there was one or not.  this can allow for splitting of tables.  in a database each field has a size.  the field is alotted its space weather the entry fills it or not.  it can also be restricted to a type (integer, char, boolean) this is mostly a size/space concern to the server since it doesn't manipulate the data much although it does make comparisons and the type of data may provide reference if you wish (and it is expected to do the filtering the data for type and size at least).  data is accessed though querys which yields not only the pruned value but relation as well.

rekall, knoda, and DBDesigner (binary but nice with the example) are db designers.  some features are available only one or another.  mysql databases have another aspect to concider and that is the type of database file that is used.  i think there are 4.  they have characteristics for storage or operations or whatever.

----------

## Pluto101

Alright, thank you. I eventually figured out that my machine think's it's name is tux, but my local DNS server (my router) calls it localhost. I'll fix that later. MySQL now know to call localhost, and is up and running. However, when installing the necessary perl files, I've run into a bit of trouble. DBD::MySQL will not test properly. I originally used CPAN to install it. When that failed, I tried emerging it, and then installing it w/ CPAN, in order to test it again. However, it still has the same problem:

It doesn't ask me for any of my user preferences, like user passwords etc. It says I can go into makefile.pl to change these, but I have no idea where it is. Should I be looking in a MySQL folder? in a Perl folder? in a seperate DBD::MySQL folder? Where is this makefile? Or, is there someway I can get CPAN to ask me for these things before installing? or should I just force install? Any tips?

Thanks again!

----------

## augury

run 

hostname {your name}

add your hostname to /etc/conf.d/hostname

and then to /etc/env.d/01hostname

----------

