The excellent BitNami LAMP stack contains its own MySQL, which is started automatically and used by PHP. If you for some reason want to use the MySQL that is installed in your host system you can do the following changes to your stack configuration:
Edit the file ctlscript.sh in your LAMP stack root directory. and change the line
MYSQL_SCRIPT=$INSTALLDIR/mysql/scripts/ctl.sh
to
MYSQL_SCRIPT=$INSTALLDIR/mysql/scripts/ctl.shx
i e, add an x to the end of the path to the MySQL control script. This will prevent the rest of the script from finding the file and MySQL will be ignored. This will also make the stack start much faster.
Edit the file php/etc/php.ini, relative to your LAMP stack root directory, and edit the following properties
The default_port properties are set to the port number you chose when you installed the LAMP stack. Change them to the port your system MySQL uses, probably 3306.
The default_socket properties point to mysql/tmp/mysql.sock inside your LAMP stack. Change them to your system MySQL socket. On my SuSE system that would be /var/lib/mysql/mysql.sock.
In your LAMP stack toot, run the command
./ctlscript.sh restart
That's it!
Comments
Post new comment