The zip format Mysql installation (1)

Mysql the zip format installation

First, configure the environment variables

First, I create a new folder, will be renamed the MySQL Sever 5.6 , the path is D: \ Program Files (x86) \ MySQL \ MySQL Sever 5.6 .

Some students may not know how to set environment variables, by the way, the path of the executable file if you later want to install the software is likely to add to the software environment variable to go. Right-click on this computer, click Properties.

 

Figure:

 

 

Then find the left side of the Advanced System Settings, click the left mouse button.

Figure:

 

 

Click on environment variables, system variables to find the path ,

Figure:

 

 

 

 

Click Edit, and then click New

 

 

We will put MySQL Sever 5.6 path D: \ Program Files (x86) \ MySQL \ MySQL Sever 5.6 Fill

 

Finally, click OK.

This completes the first step in configuring the environment variables.

Second, modify the configuration file

Find MySQL Sever 5.6 folder my-default.ini file, this is the default configuration file, and then get a code for the file (not a complete) online.

Basically, the encoding scheme is noted UTF8 , port 3306

Basedir This is the MySQL Sever 5.6 path

datadir This is the MySQL Sever 5.6 in the data path to the folder

Then pay attention to these to put [mysqld] underneath.

You can then start trying to install.

Run as administrator cmd , then type cd D: \ Program Files (x86 ) \ MySQL \ MySQL Sever 5.6, Enter

Then enter the mysqld -install , Enter, and then enter net start mysql

Luck is like this

 

However, basically there will be all sorts of mistakes.

For example, if there is such a thing: TIMESTAMP value with the DEFAULT IS deprecated the Implicit error

Solutions are as follows:

Open the my.ini ( available Notepad open ) , to find the "[mysqld]" setting item, add the code:

# Open the query cache

explicit_defaults_for_timestamp=true

 

Also, after my exploration, if you delete data named folder ib_logfile0 and ib_logfile1 two files, then re- NET Start mysql , then it will display mysql service starts normally, but the service and start up completely Login two different things, I'm in this place cards for a long time. Another method is the my.ini code [mysqld] under added default-storage-engine = INNODB this line of code, listening to friends say this INNODB and two files looks like what relevance I do not understand, INNODB is a kind of storage engine, and that the two documents is what seems like a log file, add this line of code in short, do not delete the two files on it.

 

 

The following is the complete code of the configuration file

 

# 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]

character-set-server=utf8

# 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.

skip-grant-tables

basedir = D:\Program Files (x86)\MySQL\MySQL Sever 5.6

datadir = D:\Program Files (x86)\MySQL\MySQL Sever 5.6\data

port = 3306

server_id = 104

group_concat_max_len = 4096

max_connections=20

default-storage-engine=INNODB

# Open the query cache

explicit_defaults_for_timestamp=true

 

# 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

 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[client]

default-character-set=utf8

 

 

 

Third, the login and password

Run as administrator cmd

Otherwise, there will

 

 

Well, enter the command line cd D: \ Program Files (x86) \ MySQL \ MySQL Sever 5.6 , then enter the mysqld --initialize-in the insecure , so you can generate a password-free account. Then enter NET Start MySQL , the successful launch of MySQL . Enter cd D: \ Program Files (x86) \ MySQL \ MySQL Sever 5.6 , enter, enter MySQL-uroot- , you can see the landing tips for success, as shown:

 

 

In fact, I experienced numerous errors, but forgot all the shots, can be said almost all the way upwind, coupled with the information found on the Internet varies greatly, led me to repeatedly appear in the online tutorial but the night back to the liberation of the embarrassing situation. After this experience should be summarized by doing written, unfortunately, I encountered these strange questions, the first time to feel depressed, but not thought to screenshots.

 

We currently only account with no password to log into mysql, but this is the database ah, not even a password is set, it can not be justified. Enter cd D: \ Program Files (x86 ) \ MySQL \ MySQL Sever 5.6 \ bin into this file, and then enter mysqladmin -u root -p password (your password) command line for the new account to set up a password, no surprisingly, then, there will be a warning pops up, my first reaction is desperate, through hardships and white how do ah, but I stop and copy down the line that warning, search ah search finally found a way to make me exciting message, as shown:

 

 

It will only prompt me this is a clear text password is not secure enough.

Follow the prompts to the big brother, I enter the following command:

mysql -u root -p and hit enter, there is a password words, I gingerly set up before I enter the password, because I appeared before a variety of other errors in accordance with the time course of the operation, and then excites me is that really went on board, thinking about the things I spent more than ten hours of research finally succeeded.

I am excited to enter the Show Databases , and she came out a table, Nice ! ! ! ! !

I entered Exit ; later, then enter MySQL , and she boarded go.

 

 

 

The next can finally begin to learn mysql up!

 

Guess you like

Origin www.cnblogs.com/cyx-b/p/11427496.html