Debian mysql server installation

Good time of day!
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-server-5.1
and accordingly the client part of mysql-client-5.1
install them
apt-get install mysql-client-5.1 mysql-server-5.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
Nano/var/www/mysql.php
and be there there



Тестовая страница

Apache Работает 🙂

PHP работает 🙂

\n”;

$dbhost =”localhost”;
$dbuser =”root”;
$dbpass =”pass”;

if(mysql_connect($dbhost,$dbuser,$dbpass)){
echo”

MySQL Работает!!!

\n”;
} else {
echo”

MySQL не работает :((

\n”;
}
echo “\n

\n\n”;
phpinfo();
?>



In the line that I have allocated necessary correct password, the one used during the installation of mysql
and tests, http: //localhost/mysql.php
if the page is left with all the parameters mean the test is if there is an error and will need to watch the password which you specified.
Thanks to all! If something is not clear ask questions