To install MySQL under Debian, proceed as follows:
Debian:/# apt-get Install Mysql-server
After the installation, the default root is no password and can be changed.
Debian:/# mysqladmin-u root password $ (yourpass)
You can modify some properties in/etc/mysql/my.conf.
It turns out that there is a line: Bind-address = 127.0.0.1
This means that only the machine can access it, and is willing to keep the data safe. Now you want to enable remote machines to access the MySQL database service, you can change the bind-address to achieve, two ways:
1. bind-address = 0.0.0.0
2. Comment out the bind-address line directly
When this is done, execute the following command:
/etc/init.d/mysql stop
/etc/init.d/mysql start
Some say/etc/init/d/mysql reload, but sometimes it seems to be a strange problem, with the above two steps better. Ossim official website said changed to Bind-address = *, I tried, not work, waste me a lot of time.
After these steps are done, remote machine access is also granted:
MySQL > GRANT all on * * to ' root ' @ '% ' identified by ' Root_password ' with GRANT OPTION;
The above command means that a computer with a root account and password (root_password) is allowed to access the MySQL Server for any IP address (% is a wildcard character).
That's good.
MySQL installation under Debian