Apache, PHP and MySQL

2008/03/20 by Paulo Pereira

~/categories/Linux #Linux #Ubuntu #Apache #PHP #MySQL #LAMP

Ok, setting up Apache, PHP and MySQL is super easy. I used this tip from Ubuntu Forum.

I also want to import my site and database from Windows.


In my case, the Ultimate Edition already had this installed :-)

I just updated Apache, MySQL and PHP using System > Administration > Update Manager.

Now I’m going to install PHPMyAdmin (very useful):

Get database and site from Windows

Ultimate Edition already had this installed as well :-)

I marked it to update though.

Now I need to install my Apache/MySQL/PHP solution I had under Windows.

How difficult (easy) will it be?

sudo nautilus /var/www
sudo nautilus /var/lib/mysql
sudo mysqladmin -u root password NEWPASSWORD

– NEWPASSWORD must be the same from your Windows config

Still, there’s a problem. The database is read-only. But is easy to fix:

USE mydatabase;
sudo rm -R /var/lib/mysql/mydatabase/

Post Update

After upgrading to Hardy Heron I had to reinstall the LAMP server. After the installation, when I accessed my index.php file, Firefox tried to download it.

I had to link the PHP module files to the mods-enabled Apache directory in order to get it going:

cd /etc/apache2/mods-enabled/
sudo ln -s ../mods-available/php5.load .
sudo ln -s ../mods-available/php5.conf .
sudo /etc/init.d/apache2 restart

And that was it.