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
1. Commonjs Commonjs is a custom module in nodejs...
Table of contents 1. Basic Examples 2. Computed p...
Before talking about CSS priority, we need to und...
What is VNode There is a VNode class in vue.js, w...
Common properties of tables The basic attributes ...
doctype is one of them: <!DOCTYPE HTML PUBLIC &...
1. Install Docker on the server yum install docke...
1. Problem Sometimes when we log in to Mysql and ...
Prepare the ingredients as shown above (ps: hadoo...
1 Download and prepare First, we need to download...
Table of contents A simple component example More...
I wonder if you are like me, a programmer who arr...
This article example shares the specific code of ...
Table of contents background analyze Data simulat...
let Utils = { /** * Is it the year of death? * @r...