[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-developers] How to make PHP and MySQL work on a RAQ XTR



The RAQ XTR comes with PHP installed, however, mySQL is not installed by
default.

Install MySQL on the XTR:
1) log in as admin - create a 'download' folder or a rpm 'folder' and cd
into it.
2) point a browser to www.mysql.com - follow the link for the download page
for the most recent stable version (right now, it's 3.23 version).  Find the
path to the Standard binary RPMs (all you need is the 'The server for i386
systems' and 'Client programs for i386 systems')
3) go back to your shell and type:  wget
http://path_to_latest_mysql_version.rpm  (repeat this for both the server
and the client programs)
4) su -
5) rpm -Uvh the_rpms.rpm  (do it twice - once for the server, once for the
client)

ok, at this point mySQL is installed on your cobalt xtr -- proceed to set it
up the way you want it....  get the root password set and everything and
load some databases.

You'll find that when you try to use a mysql_connect() funtion in your PHP
code, it will fail, by default.  You must modify the /etc/httpd/php.ini
file.  You need to add:
extension=mysql.so
in the right place in that file.

Now try to run your PHP script that makes a call to mysql_connect().  If it
says something about cannot connect to /tmp/mysql.sock  ---  then you must
do one more thing to make it work......   you must create a symbolic link to
the real mysql.sock inside the /tmp folder, like this:
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

That's it.  Took me awhile to figure it all out.  The knowledgebase is VERY
scarce on information.  I am not very happy with the level of support from
cobalt, personally.  I have had to figure everything out for myself....  the
XTR documentation is lacking big time.  If you have an XTR and you know how
to do something tricky, you should post the How to so others can figure it
out too.  Thanks.

Dave Koopman