Install MySQL in Win2000

Source: Internet
Author: User

I. MySQL Introduction

MySQL is a relational database management system (RDBMS ). It can organize and manage a large amount of data, and makes it easy for us to manage and obtain information through server-side scripting languages such as PHP. MySQL is completely free. It has won the favor of many users with its high openness and high-speed growth. In this article, we will introduce the installation of MySQL in Win2000.

2. download the required files

First download the mysql-3.23.29a-win.zip file from the http://www.mysql.com/Downloads/MySQL-3.23/mysql-3.23.29a-win.zip and decompress it to your local hard disk. We use the mysql_setup directory ).

3. Execute the installer and add it to the service.

Execute the c:/mysql_setup/setup.exe file. The installation process is very simple. If you select the installation path, we use the mysql directory) and select the installation mode for full installation, but only 20 mb ). Then run the following command in c: mysql/bin:

c:mysql/bin>mysqld-nt --install

Now you can see the Mysql service in "program-> management tools-> service". Its Startup type is self-start, and now you can restart your computer.

Iv. MySQL settings

MySQL only allows authorized users to access and operate information stored in its database. When MySQL is installed for the first time, it generates a user named "root", which can access everything without a password. Your first task is to set a password for the root user.

To set the password for the root user in MySQL, enter the following command in the bin subdirectory of the MySQL installation directory, which contains quotation marks ):

mysqladmin -u root password "your new password"

To make sure MySQL accepts this change, you must tell it to reload the list of authenticated users and passwords:

mysqladmin -u root reload

If the command displays an error message indicating that the password is inaccessible, do not worry. This only proves that the new password has taken effect.

To test your new password, you can request the MySQL server to tell you about its current status:

mysqladmin -u root -p status

Enter the password when prompted. You will see some simple information that includes the current status of the service. -The u root parameter tells the program that you want to log on as a "root" user. The-p Parameter tells the program to prompt you to enter your password before connection. The status parameter tells the program that you want to check the system status.

If you need to shut down the MySQL server, you can use the following command.

mysqladmin -u root -p shutdown

5. log on to MySQL

Log on to MySQL and run the following command on the command line:

mysql -h 
      
        -u 
       
         -p
       
      

You need Replace it with the host name or IP address of the computer on which your MySQL service is running. If you log on to MySQL on the same computer that runs the service, you can directly use-h localhost. It should be your MySQL user name. For your own MySQL server, this should be root.

If everything is entered, the MySQL client connects to the MySQL server and returns a command line for MySQL:

mysql>

Note that every command you enter must end with; and there are only two commands except quit and exit. You can use one of the two commands to exit the MySQL client program.


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.