apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
Assign a root password when asked for during the installation. When the installation is finished, restart the apache2 server:
/etc/init.d/apache2 restart
apt-get install phpmyadmin
Enter the following lines to phpmyadmin.conf in the /etc/apache2/conf.d
Order deny, allow Deny from all Allow from localhost 127.0.0.1 192.168.1.*
with password:
shell> mysql -u root -p
without password:
shell> mysql -u root mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
then:
mysql> CREATE USER 'user1'@'localhost' IDENTIFIED BY 'pass1'; mysql> CREATE database petstore; mysql> SHOW databases; mysql> USE database; mysql> SHOW tables;