To install MySQL Package we run:
$apt-get install mysql-server mysql-client libmysqlclient12-dev libapache2-mod-auth-mysql php5-mysql
We want MySQL to listen on all interfaces, not just localhost, therefore we edit /etc/mysql/my.cnf and comment out the line bind-address = 127.0.0.1:
$pico /etc/mysql/my.cnf
[...]
#bind-address = 127.0.0.1
[...]
Then we restart MySQL:
$/etc/init.d/mysql restart
Now check that networking is enabled.
Run $netstat -tap
In the output you should see a line like this one:
tcp 0 0 *:mysql *:* LISTEN 4997/mysqld
Run
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword
to set a password for the user root (otherwise anybody can access your MySQL database!).
if you want to install phpmyadmin package run:
$apt-get install phpmyadmin
then, restart the apache server with:
$/etc/init.d/apache2 restart
Browse phpmyadmin with address: http://localhost/phpmyadmin
Filed under: Networking




