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)