Install Mysql.zip under Windows

Source: Internet
Author: User
Tags connection pooling mysql client mysql command line

As a representative of the relational database, open source MySQL is basically something that a developer must learn and is the most suitable database for personal development--for free.

First, go to the official website to download and install MySQL. Since MySQL was acquired by Oracle, you must first register an account with Oracle's website, or not download it. Registration is not said, according to the operating system to download a MySQL community version. I download the zip version here, after extracting the path to d:/mysql, note that my path here refers to the point in the bin directory where the path. Then add Mysql_home d:\mysql,path to the system environment variable and add%mysql_home%\bin at the end. Create a new data path under a folder, of course, you can build it into your own directory, and then create a new file, My.ini, with the following

[mysql]# set MySQL client default characterset-character-set=3306# Set the installation directory for MySQL basedir=  d:\mysql# Setting the data storage directory for the MySQL database datadir=d:\mysql\data# allow maximum connections max_connections=$# The character set used by the service side defaults to the 8-bit encoded latin1 character set character-set-server=utf8# The default storage engine that will be used when creating a new table-storage-engine= INNODB

Open cmd, enter

Mysqld--initialize--user=mysql--console

Initialize the database, and note that this will generate a temporary password for the root user and write it down.

Then install the service, enter

MYSQLD--install MySQL

If the install/remove of the Service denied! error appears, your CMD is not started as an administrator. Tip service successfully installed. is successful.

Start the service

net start MySQL

Tips

The MySQL service is starting.
The MySQL service has started successfully.

When you are done, you can log in and enter

Mysql-u root-p

Enter the password to return. After successful login, the following:

Then change the password, 123456 is to change the password, you can change your own.

 for [Email Protected]=password ('123456');

Now it's time to start using the MySQL command line. Because the average person still needs a graphical database connection tool, if you only use MySQL to use the official workbench can also, or you can find a connection tool yourself. Workbench is basically a one-button installation package will not say much.

Try to build a new library demo, and build a table test to insert some test data. and select Check, database setup is complete.

 Usedemo;Create TableTest (IDChar(5) not NULL, txtvarchar( -),    Primary Key(ID));Insert  intoTestValues('A1234','asddasads'),('B2345','A213ASD');Select *  fromTest

Next article plan to integrate the configuration of the write data source with the MyBatis, and comb the basics of connection pooling.

Install Mysql.zip under Windows

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.