Mysql-5.6.17-win32 Install-free version configuration

Source: Internet
Author: User

  1. Download Mysql-5.6.17-win32; Baidu website

  2. Unzip to the custom directory, I'm here to demonstrate the D:\wamp\mysql\

  3. Copy the My-default.ini under the root directory and change the name to My.ini,my.ini replace with the following

    #以下是复制内容, it's not a copy.

    [Client]

    port=3306

    Default-character-set=utf8

    #客户端字符类型, consistent with the service side, recommended UTF8

    [Mysqld]

    port=3306

    Character_set_server=utf8

    #服务端字符类型, it is recommended that UTF8

    Basedir=d:\wamp\mysql

    #解压根目录

    Datadir=d:\wamp\mysql\data

    #解压根目录 \data

    Sql_mode=no_engine_substitution,strict_trans_tables

    [Winmysqladmin]

    D:\wamp\mysql\bin\mysqld.exe

    #解压根目录 \bin\mysqld.exe

    #以上是复制内容, it's not a copy.

  4. Environment variable Configuration

    My Computer-Properties-advanced-environment variables-NEW

    Variable Mysql_home value D:\wamp\mysql

    Find the variable path edit, add it at the back;%mysql_home%\bin

  5. Run the input cmd, or locate the C:\Windows\System32\cmd.exe, and go to the MySQL decompression directory bin subdirectory,

    C:\Documents and settings\administrator>cd\

    C:\>d:

    D:\>CD Wamp

    D:\WAMP>CD MySQL

    D:\WAMP\MYSQL>CD bin

    D:\wamp\mysql\bin>

    D:\wamp\mysql\bin>mysqld-install

    Tip: Service successfully installed. And the installation is successful.

    (cmd command: cd\ returns the root directory

    D: Enter D drive

    CD Wamp into the Wamp folder)

  6. Start, stop, and move out of the MySQL service

    Start MySQL service: net start MySQL

    Stop MySQL service: net stop MySQL

    Move out of MySQL service: mysqld-remove

    sc config MySQL start= auto

    The service is started here to facilitate next steps.

  7. To change the root password:

    Enter CMD in the run, jump to the installation directory/bin,

    D:\wamp\mysql\bin>mysql-uroot

    Mysql>show databases;

    Mysql>use MySQL;

    Mysql>delete from User where user= "";

    Mysql>update User Set Password=password (' NewPassword ') where user= ' root ';

    Mysql>flush privileges;

    mysql>quit;

    FLUSH privileges: Force MySQL to reload permissions and take effect immediately

    At this point you can log in with the following command:

    D:\wamp\mysql\bin>mysql-uroot-p

    Enterpassword:newpassword

  8.  

    8: Common commands

    Mysql>show databases;       Show All tables

    Mysql>use MySQL             switch to table MySQL         

    Mys Ql>show tables;           Display the structure of the table

     
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.