A detailed explanation of MYSQL5 manual installation method in Linux

Source: Internet
Author: User
Tags manual mysql command line

1. Get the MySQL program. The appropriate version of MySQL can be downloaded from the official Oracle Web site. I got the MySQL file for: mysql-5.5.29-win32.zip;

2. Unzip the compressed package to the desired directory. Here I extract to D:devmysql (note folder name must not exist in space, the simpler the better!!) );

3. Add the D:devmysqlbin directory to the environment variable Path;

4. According to your application needs and system environment, select a profile, named "My.ini", and then modify some of the contents in this file as follows:

[Client]
Default-character-set = UTF8

[Mysqld]
# set Basedir to your installation path
Basedir = D:/dev/mysql
# set DataDir to your data directory
DataDir = D:/dev/mysql/data
Character_set_server = UTF8
#default-character-set = UTF8
# here is mysqld bug, can't use Default-character-set

[MySQL]
Default-character-set = UTF8

5. Install MySQL as a Windows service. At the command line, enter the following command:

CD D:devmysqlbin
Mysqld-install MySQL--defaults-file=d:devmysqlmy.ini

Installation completed.

Test installation:

1) Start MySQL:

net start MySQL

MySQL Normal startup;

2) Login MySQL:

Mysql-u root-h Localhost-p

Can log on normally. Note that the root password is empty at this time;

To change the password, please exit the MySQL command line mode and enter the following command:

mysqladmin-u root-p Password "NewPassword"

MySQL installation was successful.

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.