Install Mysql database server in Debian
#apt-get install mysql-server mysql-client libmysqlclient15-dev
This will install all the required packages for mysql databaseserver.
#vi /etc/mysql/my.cnf
#bind-address = 127.0.0.1
Now you need to restart MySQL server using the following command
#/etc/init.d/mysql restart
Testing Mysql Networking
Now you need to check that networking is enabled or not using the following commnd.
#netstat -tap
In the output you should see similar to the following line
tcp 0 0 *:mysql *:* LISTEN 3281/mysqld
Setting Mysql Root password
Irf you want to set Mysql Root password use the following command
#mysqladmin -u root password mysqlrootpassword
In the above command you need to replace mysqlrootpassword with your secret password
Once you set the root password you can test this password using the following command
#mysqladmin -h serverip -u root password mysqlrootpassword
Once you loggedin in to the mysql database you should see the following mysql prompt
mysql>
0 Comments