Brief description of MYSQL database installation method and related settings _ MySQL

Source: Internet
Author: User
Tags dedicated server web database
There are many tutorials on MYSQL on the Internet, but none of them are the latest. here I will briefly describe how to install and set the latest MYSQL version. most of the operations are the same. The following is a description of Windows 64-bit operating system + MySQL 5.6.27. MYSQL has many tutorials on MYSQL online, but none of them are the latest. here I will briefly describe how to install and set the latest version of my SQL. most of the operations are the same.

The following is a description of WINDOWS 64-bit OS + my SQL 5.6.27.

MYSQL installation instructions

Step 1: Go to the MYSQL official website (http://dev.mysql.com/downloads/mysql/) to download MySQL Community Server (I .e.: MYSQL Community version), this is free, can meet the needs of general small and medium enterprises, of course, you can also download the Enterprise edition, you need to contact their sales team for related purchase operations. direct download is not provided on the website;

Download path: menu on the right: MySQL on Windows --> MySQL Installer --> Windows (x86, 32-bit), MSI Installer (with 1 1.6M and 252.6 M, recommended ).

(MySQL Installer is 32 bit, but will install both 32 bit and 64 bit binaries. (MYSQL installation software is 32-bit, but it can install 32-bit or 64-bit MYSQL)

Step 2: run the MYSQL installation program and install it step by step according to the actual situation. pay attention to the following points:

1. installation of components: you can select default installation on the SERVER side or custom installation (including mysql server and related management tools, such as Workbench). The Client can select Client Only;

2. server configuration type: for personal development, you can select a development machine. for WEB database server, you can select a server or a dedicated server;

3. set the password for the root account: The password must meet the complexity requirements;

Step 3: After the installation is successful, if no special settings are made, the MYSQL service will automatically start, in this case, you can use the Workbench visual management interface or MySQL 5.6 Command Line Client to execute some SQL commands to query the database. the related commands are as follows:

Show databases; -- display all DATABASES

Show character set; -- display all CHARACTER sets supported by MYSQL

Show variables like 'character _ set _ % '; -- display the current MYSQL server character set settings

Show variables like 'collation _ % '; -- display the current MYSQL server character set verification settings

Show create database name; -- display character set settings of a database

Show variables like 'datadir '; -- displays the location where data files in the current MYSQL database are stored.

Step 4: The default database Data file is stored in the same directory as the MYSQL installation directory. The path is C:/ProgramData/MySQL Server 5.6/Data, the show variables like 'datadir 'command can also be used to check whether the database files increase with the increase of data. We do not recommend the default setting, in this case, you can modify the MYSQL configuration file my. ini to modify the storage location of database files, my. the ini is located at: C: \ ProgramData \ MySQL Server 5.6 \ my. ini, note that not in C: \ Program Files \ MySQL Server 5.6, there is only one my-default.ini, this is not the same as before, I think the following configurations are mainly modified:

Basedir = "C:/Program Files/MySQL Server 5.6/" -- if the installation-free method is used, change the path to the decompressed directory of MYSQL.

Datadir = D: \ MySQLData -- change the database file storage location to: D: \ MySQLData

Character-set-server = utf8 -- change the database character set to utf8 (now UTF8 is used by default. if not, modify it to avoid Chinese garbled characters)

Step 5: modify my. after the INI file is saved, copy the files in the original database directory to the new custom Database Directory (for example, D: \ MySQLData) and restart the MYSQL service.

The installation version is relatively simple and will be automatically configured or installed in related development environments, such as mysql-connector-net, mysql-for-visualstudio, and mysql-workbench-community, in this way, we can directly perform related development operations, if not.. NET development, some components may not need to be installed, so you should perform a custom installation on the installation components, or use the following installation-free mode + install the corresponding plug-ins and tools.

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.