Download and installation of MySQL

Source: Internet
Author: User
Tags mysql download table definition percona heidisql keepass

Novice Road-mysql Installation

Directory structure
    • Windows platform
      • MySQL Installation
      • Sample Data Import
    • Linux Platforms
      • CentOS System
      • Ubuntu system
    • FAQ
      • Password Generation tool-keepass
      • Modify Prompt
      • Graphical tools
      • Delete Error

MySQL Installation

MySQL Download: 32-bit system download

64-bit system download

Installation process (with 64-bit platform as an example)

  1. Choosing a Custom Installation
  2. Modifying the directory where MySQL holds data files C:\Program files\mysql\mysql Server 5.5
  3. This page is the Enterprise version of the promotion, directly turned off. We only use the free. _
  4. Start the Database Configuration Wizard
  5. Select verbose mode
  6. Select Developer
  7. Select a multipurpose database
  8. Specify the location of the InnoDB table space, keeping the default
  9. Choose a business type, OLTP, online transaction processing
  10. Specify the service port for MySQL, keep the default of 3306. and recommend the use of strict SQL mode
    Sql-mode= "Strict_trans_tables,no_auto_create_user,no_engine_substitution"
    The Strict_trans_tables transactional storage engine will check the input data more closely, which will cause MySQL to refuse to accept the vast majority of illegal values
    No_auto_create_user A grant statement without the identified by clause will not be able to create a user, preventing the creation of a new user (authorized) without a password.
    No_engine_substitution when a table is built or modified, the specified storage engine is unavailable and an error occurs
  11. Character set settings, select UTF8
  12. Select the MySQL service name to include the MySQL command path in the environment variable
  13. Set the root user's password, prohibit the use of simple passwords such as 123456, the recommended use of uppercase and lowercase letters + numbers of mixed passwords, 16-bit length.
    It is recommended to use the KeePass tool software generation, the FAQ section is introduced.
    Do not create additional anonymous users.
  14. After execution, MySQL will start automatically, click Finish to complete the configuration
  15. Open run, use the cmd command. Set the cmd layout first, set the width and height of the buffer to 9999 (maximum), avoid truncation of the preceding output, or cause the formatting to be confusing due to newline.
  16. Connect to MySQL locally (localhost). Note: Do not write the password in clear text after the-p parameter.
    Select User,host,password from Mysql.user;

    This command allows you to view the accounts that are currently present in MySQL. The percent sign (%) of the host column, which means that the MySQL database can be connected from anywhere.
    Try connecting to MySQL with a local IP address. (IP address view command: ipconfig, see output "Ethernet Adapter" "IPV4 address part")

  17. Stop/restart MySQL
    In the Run window, enter ' services.msc ', open Service Manager, find the MySQL service (MySQL This service name is the 12th step, select the MySQL name). In the upper left corner, there are commands such as "Stop", "restart", and so on.
Sample Data Import

Sample Database http://examples.oreilly.com/9780596007270/
Entity Model Information Http://en.wikipedia.org/wiki/Entity-relationship_model

  1. Log in to MySQL, create Bank library
    CREATE DATABASE IF not EXISTS bank;
  2. Place the downloaded Learningsqlexample.sql file in the C:\Program files\mysql\mysql Server 5.5 Directory
  3. Select Bank Library
    Use Bank;
  4. Import the Learningsqlexample.sql data
    SOURCE C:\Program files\mysql\mysql Server 5.5\learningsqlexample.sql;

    Or

  5. View the imported data table
    Perform
    SHOW TABLES;
  6. Attached: Table definition Description
    Table name definition
    Account Specific products that are open to specific customers
    Branch A place to conduct bank transactions
    Business Company customer (sub-type of Customer table)
    Customer A person or company that communicates with a bank
    Department Group of employees performing specific banking functions
    Employee The staff of the Bank
    Individual Individual customer (sub-type of Customer table)
    Officer A person who is allowed to initiate a business transaction for a company customer
    Product Banking services provided to customers
    Product_type Grouping of products with similar functions
    Transaction Change the operation of the account balance
Linux Platforms

Import data, refer to the Windows section.

CentOS System

installation process omitted, refer to compilation/binary/rpm installation documentation

Ubuntu system

Reference http://www.percona.com/doc/percona-server/5.5/installation/apt_repo.html

Attention

    1. Version represents the release code, and if it is a 12.04LTS version, replace it with precise
    2. The version installed by Apt-get is the latest version.
    3. Set the root user password for MySQL

FAQ Password Generation Tool-keepass

Official website http://keepass.info/
Version 2.21 Http://downloads.sourceforge.net/keepass/KeePass-2.21-Setup.exe
Generate Random passwords

    1. Tools, Password Generator
    2. Display the generated password list, view the Preview tab, and select a single line.

      Modify Prompt

      Added in the MySQL section of the MY.CNF configuration file

      Prompt=\\r:\\m:\\s\_\h:\p\_\\d>

      (default) mysql>
      (modified) 10:11:36 127.0.0.1:3306 (None) >

More references

Graphical tools

Heidisql
Official Address http://www.heidisql.com/

Delete Error
if exists bank; Error 1010 (HY000): Error dropping database (can ' t rmdir '. \bank\ ', errno:17)

Workaround: Go to the C:\Program files\mysql\mysql Server 5.5\data\bank directory to see if there are other non-database files. Yes, clear.

Download and installation of MySQL

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.