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
Nano/var/www/mysql.php
and be there there
<html>
<head>
<title> test page </title>
</head>
<body>
< 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 ();
?>
</body>
</html>
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