In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to install mysql database on windows server2008, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
I. Environment configuration server
Database: mysql5.7.12
Operating system: Windows Server 2008 64 bit
Java:1.8
Second, installation and configuration steps
1. Decompress the mysql-5.7.12-winx64.zip downloaded from the official website to C:\ pgis\ db\ Mysql\ mysql-5.7.12-winx64
2. Modify the configuration file my-default.ini under the path C:\ pgis\ db\ Mysql\ mysql-5.7.12-winx64
[mysql]
# set mysql client default character set
Default-character-set=utf8
[mysqld]
# set the mysql installation directory
Basedir = "C:\ pgis\ db\ Mysql\ mysql-5.7.12-winx64"
# datadir = "C:\ pgis\ db\ Mysql\ mysql-5.7.12-winx64\ data\"
# set access port
Port = 3306
# maximum number of connections allowed
Max_connections=200
# the character set used by the server defaults to the 8-bit coded latin1 character set
Character-set-server=utf8
# default storage engine to be used when creating new tables
Default-storage-engine=INNODB
# server_id =.
/ / root logs in without a password
Skip-grant-tables
Sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
With regard to the configuration of datadir, others say this is very important. I commented out this sentence and managed to generate the data folder. On the "skip-grant-tables" line, although added, but still need a password to log in, I do not know the specific reason, there is a solution.
3. Add the windows system environment variable path, and add the following "C:\ pgis\ db\ Mysql\ mysql-5.7.12-winx64;" (note the semicolon)
4. Initialize and generate the data directory
Using cmd, execute the command in C:\ pgis\ db\ Mysql\ mysql-5.7.12-winx64\ bin: mysqld-- initialize
C:\ pgis\ db\ Mysql\ mysql-5.7.12-winx64 will generate a data folder after execution
5. Execute the installation command
Use cmd to execute the command in C:\ pgis\ db\ Mysql\ mysql-5.7.12-winx64\ bin: mysqld install MySQL
6. Turn on and off the service
In cmd:
Start the mysql command as: net start mysql
The command to turn off mysql is: net stop mysql
7. Log in using your root account
Mysql-u root
Log in using root. Log in without a password, but let you enter the password. Where the password is, you need to find it: under the installation path of the file database, search the .err file and open the file to find the generated password:
[Note] A temporary password is generated for root@localhost: R9htAgjHi_0K
"R9htAgjHi_0K" is the password of the root user, and you can log in with that user's password.
Run in cmd: mysql-u root-p
Enter password
After logging in, you can operate the database.
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.