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:
Step 1 - Prevent the stack control script from starting MySQL
Edit the file ctlscript.sh in your LAMP stack root directory. and change the line
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.
Step 2 - Make PHP use your system MySQL socket
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/run/mysql/mysql.sock.
Step 3 - Restart your stack
In your LAMP stack root, run the command