MySQL Basics for getting started with Windows

Source: Internet
Author: User
Tags mysql database

First, MySQL Introduction

MySQL is a small and smart database server software, for medium and small application system is very ideal. In addition to supporting standard ANSI SQL statements, and most importantly, it supports multiple platforms, and on Unix/linux systems, MySQL supports multithreading, which allows for fairly good performance. Like the first two software, it belongs to the open source code soft.

Second, the installation of MySQL (refers to the version of Windows)

Unzip the downloaded file into a directory, run the Setup program, will prompt the entire installation process. It is installed by default to the C:\mysql, if you want to install to other directories there are changes to some things, as beginners, you can ignore, with the default directory installation. Okay, after installation, go to the C:\mysql\bin directory and run the Mysqld-shareware.exe file

Run directly under Win98, and normally, there is no hint of information

Under NT can enter: Mysqld-shareware--install start the service

Next, enter MySQL, under normal circumstances will appear a few lines of prompt message and appear under the prompt symbol:

Mysql>

By this, you have successfully installed MySQL.

Third, set the MySQL user password

The default username for the MySQL database is "root" (similar to the SA for MS SQL Server) and the password defaults to null. At the DOS prompt (note, not the MySQL prompt), enter

c:\mysql\bin> "mysqladmin-u root-p password AdminPassword

Return will prompt you to enter the original password, because the original password is empty, direct return, root user's password will be changed to "AdminPassword".

Four, simple use MySQL database

1. Display MySQL Database (note: In the later part of the article, if not prompted, the command entered is at the MySQL prompt)

Show databases

2. Open a Database

Use test

Where test is the name of the database

3. Display all data tables in a database (you must first open a database)

Show tables

Go

4. Create a database as root (under DOS prompt symbol)

Mysqladmin-u root-p password AdminPassword Create Gsbook

Then you will be prompted to enter the password. Because, our aim is to make a message board, where I named the name of the database "Gsbook".

5. Add data tables to the database

CREATE TABLE Gsbook (ID int not NULL auto_increment,primary key (ID), nickname varchar, email varchar (), homepage varchar (), note text,w_time datetime)

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.