Mysql-5.7.27 and mysql-ODBC-8.0.17 Compact configuration and use

Mysql-5.7.27 and mysql-ODBC-8.0.17 Compact configuration and use
August 2, 2019 15:04:14 Chengdu Tianfu East Gate Bridge in Autumn

Premise: 1, repair OS comes with the DLL
because there are often too many windows system is, there is always missing dll file in the installation, these files usually you do not use; however, once the encounter but did not need them and it will report various errors inexplicable.
The so-called, after much trial and error, requires prior are repaired, so the province will save much time.

Real fix a lot of places do.
Premise 2: mysql decompressed to a specified place, the present example is D: \ MYSQL:

Start the configuration of the installation:
1, the system configuration variables:
2,

3, the variable portion of a new system variable name: MYSQL_HOME, variable value:
D: \ MYSQL Based \ MySQL-5727;

4, in the D: Create the \ MYSQL \ mysql-5727 my.ini file directory, copy the following
[mysqld]
Port = 3306
the basedir = D: \ MYSQL \ mysql-5727
DATADIR = D: \ MYSQL Based \ Data
max_connections = 200 is
Character Server = utf8--set
default-Storage-Engine = INNODB
sql_mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES
[mysql]
default-Character-the SET = utf8
Note: the contents of the red part of the mysql directory, on the path of a

Note:
You must manually New.

4, initialize the database:
5, beginning from MySQL 5.7, Oracle company began working undermine MySQL's ease of use, forcing the user to use the Oracle database. Joke friends. But no data folders make the Internet a lot invalid configuration, if not initialized, then, mysql service can not be started. Here's how to initialize:
(1) Run as Administrator cmd, and cd to the mysql bin directory, execute the command:
(2) --initialize mysqld --user = mysql the -console

Although there are warning, however, is the smooth formation of the original password initialization time:
the next two steps, install mysql service and restart (personal feeling, do not seem to mysql services can also be installed, not experiment too.)

 (2) This command creates a data directory and database to generate the root user and temporary password, as shown below, we need to remember this command in order to login.
6. Verify mysql service is started:

Visible, just the environment variable does not seem to do a good job;

Inside the bin is a normal landing. First changed the password to say!

mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> update mysql.user set authentication_string=password("123456") where user="root";
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> set password for root@localhost = password('123456');
Query OK, 0 rows affected, 1 warning (0.00 sec)
由以上可知:在5.7.27中,更新密码必须使用:
set password for root@localhost = password('123456');
其他的命令无效!

After changing the password, you can immediately normal use!

现在重新回头来说说 关于windows server 2012的环境变量的问题:
V:\Anaconda3;V:\Anaconda3\Library\mingw-w64\bin;V:\Anaconda3\Library\usr\bin;V:\Anaconda3\Library\bin;V:\Anaconda3\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\NetSarang;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;%JAVA_HOME%\jdk\bin;%JAVA_HOME%\jdk\jre\bin;D:\MYSQL\mysql-5727\bin

There are system variables mysql \ bin;
and lead out of the command was not there!
Is it because there is no reboot? Then restart it to try to see?

After the restart, it really all is well:

It seems, after windows server 2012 environment variable settings, you need to restart!
Do not tangle, listen to me, restart it get away!

Let's install the ODBC;

First of all, I think the name is too long, D: \ MYSQL \ mysql- connector-odbc-noinstall-8.0.17-winx64
need to change a little shorter (Is it is the brother of the legendary curtain wrote the code it ha ha?)
Changed : mysql-odbc-8.0.17, is decompressed version! (Why do I love the decompressed version of it?)

The installation is fairly simple:
the Step 1: The D: \ MYSQL \ mysql-odbc -8.0.17 \ dll files under lib all are copying the C: \ Windows \ System32:
D: \ MYSQL \ ODBC-MySQL-8.0 .17 \ lib> copy * .dll C : \ Windows \ System32

Step 2: into: D: \ MYSQL \ mysql-odbc-8.0.17> under execution: Install.bat:

The figure is business as usual!

Verify mysq-odbc been installed:
Command:
odbcad32 Enter!
Immediately jump out of a box: ODBC Data Source Administrator (64)
Click on the "System DSN" label

Then click Add:
proof, ODBC completely normal it!

just test it!

That’s all for today!

Guess you like

Origin blog.51cto.com/fancy0042425/2425951