Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed steps for configuring and using the compressed version of Mysql-5.7.27 and mysql-ODBC-8.0.17

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following mainly brings you the detailed steps of configuring and using Mysql-5.7.27 and mysql-ODBC-8.0.17 compressed version. I hope that the detailed steps of configuring and using Mysql-5.7.27 and mysql-ODBC-8.0.17 compressed version can bring you practical use, which is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.

Premise: 1. Fix the DLL that comes with OS

Because there are often too many windows systems installed, there are always some dll files missing, and these real files are not usually used; however, when you need them but do not have them, you will report all kinds of inexplicable errors.

As the saying goes, after many explorations, it needs to be repaired in advance, which will save much more time and time.

It really repaired a lot of places.

Premise 2: extract the mysql to a specified place. This example is D:\ MYSQL:

Begin to configure the installation:

1. Configure the system variable:

two,

3. Create a new variable name in the system variable section: MYSQL_HOME, variable value:

D:\ MYSQL\ mysql-5727

4. Create a new my.ini file in the D:\ MYSQL\ mysql-5727 directory and copy the following

[mysqld]

Port = 3306

Basedir=D:\ MYSQL\ mysql-5727

Datadir=D:\ MYSQL\ data

Max_connections=200

Character-set-server=utf8

Default-storage-engine=INNODB

Sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[mysql]

Default-character-set=utf8

Note: the red part of the content is the directory of mysql, the path of the previous part

Note:

It must be created manually.

4. Initialize the database:

5. Since MySQL 5.7, Oracle has been working to destroy the ease of use of MySQL and force users to use Oracle databases. I'm just kidding. However, the absence of a data folder makes many configuration methods invalid on the web, and the mysql service cannot be started without initialization. Here is the initialization method:

(1) run cmd as an administrator, and cd to the bin directory in mysql, and execute the command:

(2) mysqld-initialize-user=mysql-console

Despite the warning, the original password at the time of initialization was successfully generated:

The next two steps, install the mysql service and restart (personally, it seems that the mysql service can also be installed without experimentation. )

(2) this command will create the data directory and database, generate root users and temporary passwords, as shown in the figure below, we need to remember this command to facilitate login.

6. Verify that the mysql service is started:

It can be seen that the environmental variables just now do not seem to have been done well.

You can log in normally in bin. Change the password first!

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)

As can be seen from the above: in 5.7.27, the update password must be used:

Set password for root@localhost = password ('123456')

Other orders are invalid!

After changing the password, it can be used normally immediately!

Now let's go back to the question of windows server 2012's environment variables:

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%\ 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 is mysql\ bin in the system variable

But those derived from the command did not!

Is it because there is no reboot? Why don't you restart it and try it?

After the restart, everything was all right:

It seems that after setting the environment variable of windows server 2012, it needs to be restarted!

Don't worry, listen to me, restart and we're done!

It's time to install ODBC.

First of all, I think the name is too long, D:\ MYSQL\ mysql-connector-odbc-noinstall-8.0.17-winx64

It needs to be shortened (is it the code written by the legendary brother door curtain? Haha)

Changed to: mysql-odbc-8.0.17, is also a decompressed version! Why do I like the unzipped version? )

This installation is quite simple:

Step 1: copy all the dll files under D:\ MYSQL\ mysql-odbc-8.0.17\ lib to C:\ Windows\ System32:

D:\ MYSQL\ mysql-odbc-8.0.17\ lib > copy * .dll C:\ Windows\ System32

Step 2: go to: d:\ MYSQL\ mysql-odbc-8.0.17 > and execute: Install.bat:

The picture above is what everything looks like!

Verify that mysq-odbc is installed:

Command:

Odbcad32, enter!

Immediately jump out of a box: ODBC data source manager (64-bit)

Click the label "system DSN"

Click add again:

Prove that ODBC is completely normal!

For the above configuration and use of Mysql-5.7.27 and mysql-ODBC-8.0.17 compressed version of the detailed steps, we do not find it very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report