Install and configure the green version of MySQL)

Source: Internet
Author: User
Installation and configuration of green MySQL

I downloaded MySQL 5.1.

:

Http://dev.mysql.com/downloads/mysql/

Download the free installation package (mysql-noinstall-5.1.45-win32.zip)

Decompress the compressed file to E: \ mysql-5.1.39-win32

1. Add E: \ mysql-5.1.39-win32 \ bin in the path of the system environment variable (Note: This is my MySQL installation path)

2. Edit the MySQL run configuration file my. ini. If not, copy the my-medium.ini and name it My. ini

Copy one copy to E: \ mysql-5.1.39-win32 and C: \ WINDOWS respectively

Edit the my. ini file.

 [Mysqld]
# Set the installation directory of MySQL
Basedir = E:/mysql-5.1.39-win32/ 
# Set the data storage directory of the MySQL database, which must be data or \ XXX \ data
Datadir = E:/mysql-5.1.39-win32/Data 

************** *****
# Set the character set of the MySQL server
Default-character-set = utf8 
 
[Client]
# Set the character set of the mysql client
Default-character-set = GBK

************** *****

Note: The configuration in the split line is optional. You can set it when creating a database.

3. Install the MySQL Service
Enter the directory e: \ myserver \ MS-DOS \ bin from the mysql-5.0.37-win32 window and run the following command:
Mysqld -- installMysql5-- Defaults-file = c: \ windows \ My. ini

Mysql5 is only the name of the service. You can set it by yourself. For example, change it to Xiaomai.

That is, mysqld -- installXiaomai-- Defaults-file = c: \ windows \ My. ini

 

4. start MySQL database
in the preceding command window, enter the command: Net start mysql5
in this way, mysql service.

5. Stop the service
Run Net stopMysql5  You can.

 

6. After the installation is completed in the preceding five steps, the default MySQL Root User Password is blank.

You can set the root password:

Win + R-> Enter cmd-> open the windows command console and locate the file directory at will, as shown below:

E: \ erlangpro \ mysqltest \ SRC> mysql-u root-P
Enter password:
Welcome to the MySQL monitor. commands end with; or \ G.
Your MySQL connection ID is 8
Server version: 5.1.39-Community MySQL Community Server (GPL)

Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.

Mysql> use MySQL
Database changed
Mysql> Update user SET Password = PASSWORD ('admin') where user = 'root ';
Query OK, 2 rows affected (0.03 Sec)
Rows matched: 2 changed: 2 Warnings: 0

Mysql>

Log out of MySQL and restart the MySQL service.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.