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

The method of direct decompression and installation of mysql

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly introduces the method of direct decompression and installation of mysql, which is very detailed and has a certain reference value. Interested friends must finish reading it!

Mysql directly extract the installation method: first extract the mysql to any path; then open "computer-> Properties-> Advanced system Settings-> Environment variables"; then change a file name under the root directory to my.ini; and finally start mysql.

Installation method of mysql 5.5.x zip direct decompression version

1. Download mysql-5.5.10-win32.zip from the official website, and then extract the mysql to any path, such as C:\ mysql-5.5.10-win32

two。 Open computer-> Properties-> Advanced system Settings-> Environment variables

Create a new environment variable named MYSQL_HOME, and the value of the variable is your mysql root directory, such as C:\ mysql-5.5.10-win32

Then add:;% MYSQL_HOME%\ bin to the system variable Path

3. Under the root directory, there are several ini files that have been written at the beginning of "my-". Choose one that suits you, such as my-small.ini.

Make a copy, change the file name to my.ini, and add the following:

[mysqld] # set character set to utf8 default-character-set = utf8 basedir = C:/mysql-5.5.10-win32 datadir = C:/mysql-5.5.10-win32/data [client] # set client character set default-character-set = utf8 [WinMySQLadmin] Server = C:/mysql-5.5.10-win32/bin/mysqld.exe

4. Open a command prompt, go to the% MYSQL_HOME%/bin directory, and execute the command: mysqld-install to install mysql into windows's service. After successful execution, you will be prompted: C:\ mysql-5.5.10-win32\ bin > Service successfully installed.

If you want to uninstall the service, execute the command: mysqld-remove.

Then execute at the command prompt: net start mysql to start mysql, stop the service and enter the command: net stop mysql.

If you want to set whether mysql starts automatically, you can type service.msc in the start menu-> run to open service management to set it.

5. When logging in for the first time, enter:

C:\ Users\ Administrator > mysql-u root

Change the password:

Method 1:

Mysql > update mysql.user set password=PASSWORD ('root') where User='root' mysql > flush privileges

Or

Method 2: use mysqladmin

Mysqladmin-u root password "newpass"

If root has already set a password, use the following methods

Mysqladmin-u root password oldpass "newpass"

Method 3: edit the user table directly with UPDATE

Mysql-u root mysql > use mysql; mysql > UPDATE user SET Password = PASSWORD ('newpass') WHERE user =' root'; mysql > FLUSH PRIVILEGES

You can do this when you lose your root password

Mysqld_safe-- skip-grant-tables& mysql-u root mysql mysql > UPDATE user SET password=PASSWORD ("new password") WHERE user='root'; mysql > FLUSH PRIVILEGES

6.MySQL 's user database has blank rows. Delete it and then OK it.

Mysql > delete from user where user= "; the above is all the contents of mysql's direct decompression and installation method, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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