Debian mysql server installation

Today let’s talk about how to install the mysql database server
looking for a package to install, we will need the server side and the client
apt-cache search mysql-server
at the time of writing, I have this here is the package mysql-server5.1
and accordingly the client part of mysql-client-5.1
install them
apt-get install mysql-client-5.1 mysql-server5.1
It would lift all machine that he lacks will ask a couple of questions there like would no problem
The installation is over, we need to test it
create another test page
and be there there
<title> test page </title>
< p align = ‘ center > Apache Works🙂 </p>
<? php
echo “< p align = ‘ center > PHP works🙂 </p> \n”;
$dbhost = localhost”;
$dbuser = “root;
$dbpass = “pass;
If (mysql_connect ($dbhost, $dbuser, $dbpass)) {
echo “< p align = ‘ center > MySQL work! </p> \n “;
} else {
echo “< p align = ‘ center > MySQL not working🙁(</p> \n”;
echo “\n <br> <br> \n\n;
phpinfo ();
In the row where I need to edit the password, the one used when installing mysql
and testim, http://localhost/mysql.php
If the page was released with all parameters means the test has passed, if not the error and you will see the password that you specified.
Thanks to all! If something is not clear ask questions