First, let me remind you that I’m not an expert at Ubuntu, so the following is again, the result of a couple of buckets of sweat !
Have been fiddling around with PHP and MySQL for a while — didn’t work out at first.
then I found why I couldn’t get them to work properly…
1) MySQL is setup in such a way, you cannot connect to it from the outside.
solution : change the my.cnf file (on my system, it was located in /etc/mysql/)
find a line that says “skip-networking” (without the quotes) and put a # in front of it.
there, now you can connect to MySQL from a graphical shell like MySQL Administrator on a Windows machine ;-) of course, MySqlCC on Linux is just as good.
2) PHP is set up to ignore MySQL completely
solution : un comment two lines in php.ini (on my system it was located in /etc/php4/apache2/) watch out though … they give some sample lines, but one of them has
a spelling mistake in it… it should be extension=mysql.so and extension=gd.so for some reason, one of those lines is written msql.so.
3) rights have to be set correctly
4) Dreamweaver functions have to be installed on the server to be able to test your connection
somewhere on your windows computer, you should be able to find a folder called _mmServerScripts. This folder needs to be copied into the folder where your PHP application will be created (I don’t remember if DWMX2004 did it automatically — but I remember copying it manually).
Some useful commands :
to restart mysql (you need to restart it when adding or changing userrights)
sudo killall mysqld (to stop it)
sudo mysqld start (to start it)
when changing ini files and conf files you need to restart apache … without restarting linux, this is done with :
sudo /etc/init.d/apache2 restart