In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to install windows mysql, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
1. First, download the latest version of mysql from the mysql official website, attach the link, click the open link, and select the corresponding package according to your system model. It is about 300 megabytes and the version number is 5.7.19.
After downloading, unzip it, which is a standard mysql file, as shown in the figure
two。 The second step, configure system environment variables, desktop → my computer → right-click "properties" → advanced system settings → environment variables → system variables → new
The variable name can be taken as you like. I call it MYSQL_HOME here. The variable value is the directory where the mysql folder you just downloaded is located. We point to the bin directory in it, and then make sure to return it all the way.
3. There is no default configuration file in our mysql file. We create a new .ini configuration file named my-default.ini, which contains the following contents:
# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html# * * DO NOT EDIT THIS FILE. It's a template which will be copied to the# * * default location during install, and will be replaced if you# * * upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M# Remove leading # to turn on a very important data integrity option: logging# changes to the binary log between backups.# log_bin# These are commonly set Remove the # and set as required.# basedir = D:\ mysql-server# datadir = D:\ mysql-server\ data# port =. # server_id =. # set the server character set to utf8character_set_server=utf8collation-server=utf8_general_ci# set the installation directory of mysql basedir = D:\ mysql-server# set the data file storage directory of mysql datadir = D:\ mysql-server\ data# set the port port bound by mysql service = 330sets the maximum number of connections allowed by mysql max_connections=15# Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed Experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2m [client] # set the client character set default-character-set= utf8 [WinMySQL admin] Server = D:\ mysql-server\ bin\ mysqld.exesql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
Pay attention to several paths inside, and be sure to change them to the path where your mysql folder is located. Since the directory I put is D:\ mysql-server, the above configuration paths are all for this.
4. Prepare to install mysql, via the command line tool
First start cmd as an administrator! Pay attention!, be sure to start as an administrator, otherwise an error will be reported later, indicating that the permissions are not enough.
The command is as follows: mysqld-install, if the following prompt appears, the installation is successful
Then start the service with the command: net start mysql
An error was reported at this time, and the prompt could not be started. 3534, we use the mysqld-- console command to view the error log.
Here is a hint that there is no\ data file or path in the mysql folder, so let's create a new one.
We enter the path to the mysql folder with the command and enter the following command:
Mysqld-initialize-insecure-user=mysql
After executing the above command, MySQL will create a data folder and default database. The login user name is root and the password is empty.
At this point, we restart mysql and find that it can start normally.
The above is all the contents of the article "how to install mysql in windows". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.