Non-installed version of MySQL installed

This is not introduced one-click install, one-click installation is very simple, explain here how to install the command

1: Locate the installation source: You can go online to download a local file: E: \ system install package \ MySQL \ mysql-5.7.25-winx64

2: E: \ system install package \ MySQL \ mysql-5.7.25-winx64 folder, create a file: File name: my-default.ini

Document reads as follows:

[mysqld]
explicit_defaults_for_timestamp to true =
# Set MySQL installation path
basedir = D: / java source / MySQL / mysql-5.7.25-winx64
storage directory setting data # mysql database, a Data
DATADIR = D: / Java Source / MySQL / Winx64-5.7.25-mysql / Data
# set database connection port
port = 3306
Socket = /tmp/mysql.sock
default-sET-character set # = GBK character set mysql server
Skip-locking
key_buffer = 16K
the max_allowed_packet = 1M
the table_cache = . 4
sort_buffer_size = 64K
as read_buffer_size = 256K
of read_rnd_buffer_size = 256K
net_buffer_length The 2K =
thread_stack The = 64K
[Client]
#Password your_password =
Port = 3306
Socket = /tmp/mysql.sock
default-character-set=gbk

Figure:

Note: D: / java source / MySQL / mysql-5.7.25-winx64 is the backslash, to distinguish: \ with /

3: Open the CMD console administrator privileges. Enter E: \ system install package \ MySQL \ bin next file mysql-5.7.25-winx64 folder:

For example: E: \ System installation package \ MySQL \ mysql-5.7.25-winx64 \ bin

Execution Language: mysqld -install

                The successful implementation will return: Service successfully installed.
                The implementation of the end, prove that you can already see the windows service to the service, but will still start newspaper

 

4: enter mysqld -initialize-insecure -user = mysql

 If the execution error, there may be two problems:

           1: Tips path is not correct. Check above my-default.ini datadir file path is correct, or data folder does not exist, you need to manually create a data folder. (Compare this pit, in many cases may need to manually create, automatically creates the data folder when executing the statement, but sometimes it has been given)

           2: Tips file already exists, the above statement is executed before the instructions, and there are data files inside the folder. This time need to delete the data inside the file, and then execute.

Need to start the content file data folder in the following figure:

5: start the service: net start mysql, stop the service: net stop mysql
                    appear mysql service has started successfully explained

    Above mysql been installed successfully, but the database is the default root password is blank.

 

6: password:

 

 

 

 

 

Guess you like

Origin blog.csdn.net/xulong5000/article/details/90715744