Web Hosting Talk







View Full Version : mySQL/PostgreSQL and PHP installation questions


afriq
05-14-2001, 10:21 AM
This was posted under another thread, but it might be better to re-post under a new thread ...

I have some mySQL/PostgreSQL questions (related to your post):

[1] mySQL is supposed to be pre-installed on a RaQ 4i. How does one check to see that is is actualy installed? I guess one option is to try and locate the mysqladmin executable, or the actual datafiles?

[2] If it isn't, should one install mySQL before doing the PHP upgrade? And are there any specific settings during the mySQL installation process to watch out for?

[3] PostgreSQL is used for the control panel - how does one use a 2nd instance of PostgreSQL (i.e. 2nd process) to allow clients to use PostgreSQL for their own sites?

[4] Default locations for the above-mentioned installations - what would that be (one would normally expect it under /opt or /usr)?

Thanks,

Johan

huck
05-14-2001, 04:25 PM
MySQL vs. PostgreSQL
My Raq 4 came with PostgreSQL preinstalled not MySQL. I think this is standard, but don't qoute me on that. ;)

Finding MySQL
There are two parts to mysql -- the client and the server.
To check if mysql is installed do a find for the mysql daemon (mysqld) or look in /usr/sbin for mysqld. If mysqld is there, then mysql is probably already installed.

Installing MySQL
The latest version of MySQL can be compiled from source, installed using a redhat rpm, or a pkg file. These installations range from hardest to easiest. If you know how to compile programs, you should really take some time to compile MysQL. See this article on compilation issues:
http://www.devshed.com/Server_Side/MySQL/Optimize/
Note: you see good performance increases when compiling MySQL properly; but if your server is never under heavy load, then I would take the easy way out and use the pkg files.

PostgreSQL Info
I am not a PostgreSQL expert, but I believe you simply need to grant additional clients access to the PostgreSQL database and set them up with a table. I believe this is similar to how you would handle a MySQL database allocation. Here's a tutorial for more info:
http://postgresql.readysetnet.com/users-lounge/docs/7.0/tutorial/

Default Installs
In today's world of rpms, pkgs, and deb default installations are not the norm. All of these package managers tend to stick things where they want them. Also the databases, clients, and servers are usually stored in different locations. Common locations for the MySQL and Postgre related programs:

PostgreSQL Single User
/usr/bin/postgresql
PosgreSQL Multiuser
/usr/bin/postmaster (yeah, its called postmaster)

MySQL daemon
/usr/sbin/mysqld
MySQL client
/usr/bin/mysql
MySQL utilities
/usr/bin
/usr/sbin
/usr/local/bin
/usr/local/sbin

See:
MySQL
http://www.mysql.com/
PostGreSQL
http://postgresql.readysetnet.com/

afriq
05-15-2001, 01:38 AM
Huck,

Thanks for all that - very helpful indeed :D

Johan