MySQLforWin764-bit installation successful

Source: Internet
Author: User

After one night of hard work, the installation was successful:

The information collected on the Internet mainly includes the following two aspects:

First aspect:

MySQL5.6.13 installation procedure (64-bit Windows 7)

1. Download MySQL Community Server 5.6.13
2. decompress the MySQL package
Decompress the downloaded MySQL package to the custom directory. The decompressed directory is:
"D: \ Program Files \ MySQL \ mysql-5.6.13-win32"


Copy the default file my-default.ini in the unzipped directory and change it to my. ini.
Copy the following configuration information to my. ini and save it.
# If there is no my-default.ini, you can create my. ini yourself or get it from somewhere else

######################################## #################
[Client]
Port = 3306
Default-character-set = utf8


[Mysqld]
Port = 3306


Character_set_server = utf8
# Character_set_server = utf8 must be written like this;


Basedir = D: \ Program Files \ MySQL \ mysql-5.6.13-win32
# Decompress the Directory


Datadir = D: \ Program Files \ MySQL \ mysql-5.6.13-win32 \ data
# Extract the data directory under the Directory, which must be the data directory


SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES


[WinMySQLAdmin]
D: \ Program Files \ MySQL \ mysql-5.6.13-win32 \ bin \ mysqld.exe
######################################## #################

3. Add Environment Variables
The procedure is as follows:


1) Right-click my computer-> properties-> advanced system settings (advanced)-> Environment Variables
Click new Under System Variables
Input variable name: MYSQL_HOME
Input variable value: D: \ Program Files \ mysql-5.6.11-winx64
# This is the custom extract directory of mysql.


2) Select the Path in the system variable
Click Edit
Add the variable value % MYSQL_HOME % \ bin to the variable value.
Note that this variable is added after the original variable value and separated by;. The original variable value cannot be deleted,


4. Register a windows system service
Register mysql as a windows system service


The procedure is as follows:


1) log on to the bin directory under the MySQL decompression directory from the console:


2) enter the service installation command:


Mysqld install MySQL -- defaults-file = "D: \ Program Files \ MySQL \ mysql-5.6.13-win32 \ my. ini"
# Decompress the my. ini file modified in the directory


After the installation is successful, a message is displayed, indicating that the service is successfully installed.


# Note: Put the my. ini file in the root directory after MySQL Decompression


# The command for removing a service is mysqld remove.

5. Start the MySQL Service
Method 1:


Run the following command to start the service: net start mysql.


Method 2:


Open the management tools service and find the MySQL service.


Right-click Start or click Start on the left to start the service.

6. Modify the password of the root account
When the installation is complete, the default password of the root account is blank. You can change the password to the specified password. Example: 123456


Method 1:


C:> mysql-uroot


Mysql> show databases;


Mysql> use mysql;


Mysql> UPDATE user SET password = PASSWORD ("123456") WHERE user = 'root ';


Mysql> flush privileges;


Mysql> QUIT




7. Create a MySQL console shortcut:
The procedure is as follows:


1) Right-click the desktop and choose new> shortcut> Object Location. Enter C: \ Windows \ System32 \ cmd.exe.
The shortcut name is defined by yourself. OK. The shortcut is successfully created.


2) Right-click the created shortcut and choose Properties> modify the target column to MySQL startup parameters:
C: Windows \ System32 \ cmd.exe "D: \ Program Files \ MySQL \ mysql-5.6.13-win32 \ bin"/k mysql-uroot-p inventory
Explanation: CMD path "MySQL path bin directory"/k mysql-u username-p Password Database Name


3) Click OK to save the modification. Double-click the shortcut to connect to the MySQL database.

Aspect 2:

Start mysql command line service in cmd. 1. Check whether your mysql works properly.
Log on to the database
Cmd -- input in the "command prompt character" window,
Enter cd C: \ mysql \ bin and press the Enter key to switch the directory to cd C: \ mysql \ bin
Enter the mysql-uroot-p command and press enter to prompt you to enter the password. If you have just installed MYSQL, the Super User root has no password, so press enter to enter MYSQL.
MYSQL prompt: mysql>
2. Check whether the show databases is returned.
If an error occurs, the mysql installation may be incorrect.
Reconfiguration


In c: \ windows \ my. ini
Look
User = root
Password =
These two items.




(3) change the MySQL database directory
A) Open the cmd Command Prompt window, enter the command: net stop mysql to stop MySQL service running; B) Open X: \ Server_Core \ MySQL \ my. ini,
Find:
Datadir = "X: \ Server_Core \ MySQL \ data"
To:
Datadir = "X: \ Database"
C) copy the X: \ Server_Core \ MySQL \ data folder to X: \ and rename it to X: \ Database;
D) Open the cmd Command Prompt window and enter the command: net start mysql to start the MySQL service.
E) re-test whether MySQL works normally.


(4) Prepare LibMySQL Dynamic Link Library
Convert the X: \ Server_Core \ MySQL \ bin \ libmySQL. dll file
Copy to C: \ Windows \ System32 Reprinted token

1. Check whether your mysql instance works properly.
Log on to the database
Cmd -- input in the "command prompt character" window,
Enter cd C: \ mysql \ bin and press the Enter key to switch the directory to cd C: \ mysql \ bin
Enter the mysql-uroot-p command and press enter to prompt you to enter the password. If you have just installed MYSQL, the Super User root has no password, so press enter to enter MYSQL.
MYSQL prompt: mysql>
2. Check whether the show databases is returned.
If an error occurs, the mysql installation may be incorrect.
Reconfiguration

In c: \ windows \ my. ini
Look
User = root
Password =
These two items.


(3) change the MySQL database directory
A) Open the cmd Command Prompt window, enter the command: net stop mysql to stop MySQL service running; B) Open X: \ Server_Core \ MySQL \ my. ini,
Find:
Datadir = "X: \ Server_Core \ MySQL \ data"
To:
Datadir = "X: \ Database"
C) copy the X: \ Server_Core \ MySQL \ data folder to X: \ and rename it to X: \ Database;
D) Open the cmd Command Prompt window and enter the command: net start mysql to start the MySQL service.
E) re-test whether MySQL works normally.

(4) Prepare LibMySQL Dynamic Link Library
Convert the X: \ Server_Core \ MySQL \ bin \ libmySQL. dll file
Copy to C: \ Windows \ System32


Related Article

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.