MySQL is a very powerful relational database. However, some beginners encounter various difficulties during installation and configuration. I will not talk about the installation process here, but will talk about the configuration process. When you download MySQL from the official website, there are two formats: msi and zip. You can directly run the Msi installation, and unzip the zip file to your favorite directory address. When installing both of these, you need to configure them before you can use them. The following introduction mainly focuses on the default address of the msi format: C:\Program Files\mysql-5.7.18-win32. one. After installation or decompression, you need to configure environment variables. The process is as follows: My Computer -> Properties -> Advanced System Settings -> Advanced -> Environment Variables. In System Variables, click Path and select Edit. Add "C:\ProgramFiles\mysql-5.7.18-win32\bin;" What needs to be noted here is that it is not covering! Also, it is best to add it at the very beginning. The British semicolon ";" cannot be omitted. (You can also insert it in the middle, but remember to add it after ";".) two. Click the Start menu, search for cmd.exe, left-click and run as administrator. Be sure to run it as administrator! ! ! If you run cmd directly, when you enter mysqld -install, an error will appear due to insufficient permissions: Install/Remove of theService Denied! When you correctly enter mysqld –install and press Enter, it will display The service already exists! three. Then enter net start mysql to start the server. If it shows that the server startup failed, as shown in the figure below. This is because in versions 5.7 and above, there is no data folder in the C:\Program Files\mysql-5.7+ directory. Here, remember not to copy the data folder of other versions of MySQL. Instead, enter mysqld--initialize-insecure --user=mysql in the window. Note that there is a space before the "--", then press Enter. (It takes half a minute to wait, depending on the speed of the computer) (In the C:\ProgramFiles\mysql-5.7.18-win32 directory, there is no data folder. As shown below) Note: In versions below 5.7, you need to modify my-default.ini in the C:\ProgramFiles\mysql-5.* directory. Right-click and edit. basedir=…… datadir=….. Modified to basedir= C:\Program Files\mysql-5.* datadir= C:\Program Files\mysql-5.*\data That's it, where "C:\Program Files\mysql-5.*" is determined by the actual installation location Four. In the C:\ProgramFiles\mysql-5.7.18-win32 directory, it shows that the data folder was created successfully. After creating the data, enter mysqld –install and press Enter (if the startup is successful in step 3, you do not need to enter it again) 5. After the service is successfully started, you can log in, enter mysql -u root –p and press Enter. Enter password will appear. Since no login password is set, you don’t need to enter anything, just press Enter. After pressing Enter, as shown below, the MySQL configuration has been successful! The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of JS browser storage
>>: Windows Server 2016 Standard Key activation key serial number
http return code list (below is an overview) for ...
Preface Nginx 's built-in module supports lim...
The role of the interface: Interface, in English:...
1. Upper and lower list tags: <dl>..</dl...
Table of contents background Effect Ideas backgro...
This article example shares the specific code of ...
This article mainly introduces three methods of i...
This tutorial shares the detailed steps of instal...
Environmental preparation: VMware+CentOS, jdk 1. ...
Binlog is a binary log file that is used to recor...
When making a table page, sometimes the width set ...
<br />Structure and hierarchy reduce complex...
Table of contents Tutorial Series 1. Introduction...
In fact, this is also a clickbait title, and it c...
Because the router at home forced to reduce the b...