MySQL installation in Debian

Source: Internet
Author: User
To install MySQL In Debian, follow these steps: Debian: # apt-getinstallmysql-server. After installation, the root account has no password by default. You can change the password. D.

Install MySQL In Debian. Step: Debian:/# apt-get install mysql-server. After installation, the default root has no password. You can change the password. D.

To install MySQL In Debian, follow these steps:

Debian:/# apt-get install mysql-server

After installation, the root account has no password by default and can be changed.

Debian:/# mysqladmin-u root password $ (yourpass)

You can modify some attributes in/etc/mysql/my. conf.

The original line: bind-address = 127.0.0.1

This means that only the local machine can access the service and is willing to ensure data security. To allow remote machines to access the MySQL database service, you can change bind-address:

1. bind-address = 0.0.0.0

2. comment out the bind-address line directly.

After this is done, run the following command:

/Etc/init. d/mysql stop

/Etc/init. d/mysql start

Some may also say/etc/init/d/mysql reload, but sometimes it may seem strange, it is better to use the above two steps. On the Ossim official website, I changed it to bind-address = *. I tried it and it didn't work. It wasted a lot of time.

After completing these steps, you can also grant the remote machine access permission:

Mysql> grant all on *. * TO 'root' @ '%' identified by 'root _ password' with grant option;

The preceding command allows a computer with any IP address (% is a wildcard) to access the MySQL Server using the root account and password (root_password.

This is fine.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.