In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to install debian apt mysql without a password, many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
Debian apt mysql password-less installation
You only need apt-get install mysql-server-5.x to install mysql database under debian, and then a dialog box pops up during the installation process, which allows you to enter the password of mysql's root account. If you want to install mysql on 100 machines in batches, it will be troublesome. Do you want to set the password one by one? There are really shortcuts to google's discovery.
If the deb package of mysql is not installed, apt can be implemented. The following operations are all on debian6:
1 www.2cto.com
Apt-get-d install mysql-server-5.1
-d means that download-only is downloaded but not installed, and the package downloaded by debian is in the / var/cache/apt/archives directory by default.
The dpkg-preconfigure command is the debconf that imports the relevant package. It shows which interactive questions he will have to answer before the package installation. Go to the / var/cache/apt/archives directory and execute the following command:
one
Dpkg-preconfigure-server-5.1_5.1.49-3_amd64.deb www.2cto.com
The debconf-show command can query the debconf database of related packages.
You can see that there are two password that need to be set up. Create a mysql-passwd file in the / tmp directory and enter the following and make the file effective:
Apt-get clean clears the cached package and then starts installing mysql using apt. No more dialog boxes pop up during the process
You can see that the password setting box does not pop up during installation, then log in to the database with the 123456 password set in mysql-passwd, and then change the root password to 999999 to log in:
Www.2cto.com
Everything is fine, so you can install mysql in bulk without setting a password, and can also be extended to other software packages.
Here are some of the package management commands used above:
Debconf-set-selections: insert default values in debconf database.
Useage:
Debconf-set-selections file
Debconf-get-selections | ssh newhost debconf-set-selections
Www.2cto.com
File data format
The data is in behavior units, lines starting with # are comments, blank lines are ignored, and the default values for other lines setting problems should contain four values, each separated by a space, with only one space or tab between the type and value: any extra space will be interpreted as part of the value. A line can be divided into multiple lines by the backslash ("\") connector at the end of the line. It is more appropriate to split a row after the problem; splitting between types and values is a bad practice. When a split line is concatenated, the spaces at the beginning and end of the line are reduced to a single space, and then formed into a separate line. For the debconf variable (template) used by the installer itself, owner should be set to "dmuri"; to preset the variable in the installed system, use the package whose name contains the corresponding debconf template. Only those variables whose owner is not "dmuri" will be saved to the debconf database of the system after installation. To detect the values available for the answer to the question, you can use nano to check the files under / var/lib/cdebconf during the installation. Templates.dat is the original template, and questions.dat is the value of the current variable setting. To test the configuration file for format errors before installation, you can use debconf-set-selections-c file to check.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.