absrtact : said that the database small and medium-sized enterprise mostly uses SQL Server and Mysql,sql server is developed by the Microsoft Company, he and iis,asp combine to run the effect very good. But SQL Server needs to pay, and MySQL is completely free, on the one hand can save enterprise expenses, on the other hand, the enterprise website through the PHP language development situation using MySQL performance better. Today, the author will lead you to learn how to install MySQL.
Speaking of database small and medium-sized enterprise mostly uses SQL Server and Mysql,sql server is developed by Microsoft Company, he and iis,asp combine to run very good. But SQL Server needs to pay, and MySQL is completely free, on the one hand can save enterprise expenses, on the other hand, the enterprise website through the PHP language development situation using MySQL performance better. Today, the author will lead you to learn how to install MySQL.
MySQL Small file:
software version : 4.0.26
software size : 25.6MB
Software language : English version
software type : Free software
applicable platform : Windows 2000/xp/2003
Download Address :
Http://download.discuz.net/mysql-4.0.26-win32.zip
First, install MySQL:
Installing MySQL is simple, just follow the installation Wizard step-by-step. The program is also available for free download from the Internet.
The first step: after decompression into the MySQL directory run the main program to start the installation. (Figure 1)
Figure 1: Running the main program to start the installation
Step Two: View the installation protocol, and click the "NEXT" button to continue. (Figure 2)
Figure 2: Viewing the installation protocol
The third step: Choose the installation directory, the default is to install MySQL in the C:\mysql folder, we can pass the button next to modify the default path, here we recommend that you install MySQL in the C:\usr\mysql directory. (Figure 3)
Figure 3: Selecting the installation directory
Fourth step: In the installation type to choose typical Typical installation, of course, if you know more about MySQL can choose the installation type, installation program will give three options, typical (Typical installation), Compact (minimum installation), Custom (choose to install), Users can choose a suitable installation method according to their own needs. Click the "NEXT" button to continue. (Figure 4)
Figure 4: Choosing the Installation Type
Fifth step: Copy the required files to the local hard drive. (Figure 5)
Figure 5: Copying the installation files to the local hard drive
Sixth step: After copying all the files to complete the installation work, point "Finish" button to end the installation. (Figure 6)
Figure 6: Completing the installation
So far we have installed the MySQL program on our own computer, and then we have to initialize the settings to normal use.
Second, MySQL initialization:
MySQL initialization mainly completes the Administrator password setting and test database connection is normal operation.
Step One: Enter the C:\usr\mysql\bin directory, which is the directory we just chose when we installed it. (Figure 7)
Figure 7: Entering the C:\usr\mysql\bin directory
Step Two: Locate the program named Winmysqladmin.exe in the directory, double-click Run.
Step three: The first time the program is started, the computer automatically detects whether the MySQL database server has a user presence. Generally speaking, the system's default user name is root, the password is empty, the system will prompt the establishment of a user, user information can be completed according to personal preferences. The author input user name for root, password can fill in a random. Click the OK button to complete the setup. (Figure 8)
Figure 8: Enter user name and password
The fourth step: the next MySQL on the normal operation, you will be in the lower right corner of the taskbar to see its icon. A similar sign of traffic lights, in the starting state, the system column in the logo for the green, if it is stopped state on the display of red light, if there are problems show yellow light. (Figure 9)
Figure 9: View MySQL Status
Fifth step: Click the traffic lights sign and choose Show me to enter the management panel. (Figure 10)
Figure 10: Access to the admin panel
Sixth step: In the MySQL management panel will see the configuration profile and the individual database names and table names, which will be used in the future use, this is not explained in detail. (Figure 11)
Figure 11: View MySQL Basic configuration information
Third, test database connectivity:
After installing and initializing MySQL We also want to test whether the database can be connected properly.
The first step: Through the "Start-> run-> input cmd" into the command line mode.
Step two: Use cd\ to retire to C packing directory, then use CD usr,cd MYSQL,CD bin three commands into the C:\usr\mysql\bin directory. (Figure 12)
Figure 12: Entering the C:\usr\mysql\bin directory
Step three: Enter mysql-h xxzxcompaq connection this MySQL database, name Xxzxcompaq is actually the computer name, of course, we can also use IP address or localhost to replace, appear welcome to the MySQL Monitor . Commands End With; or \g.
Your MySQL Connection ID is 459 to server Version:3.22.20a-log
Type ' help ' for help.
Mysql>
Indicates that we are connected to the database properly. (Figure 13)
Figure 13: The Normal connection database
Small tip:
When you want to log on to other databases on the Web, you need to use a command such as mysql-h host-u user-p password, with the-h host name or IP address,----The database user name,--followed by the password.
Fourth step: Enter at the mysql> prompt. You can view the available commands. (Figure 14)
Figure 14: View available commands
Step Fifth: Enter connect test to connect to the default database. (Figure 15)
Figure 15: Connecting to the default database
Four, start the MySQL database:
After installing the MySQL database, we have several ways to start him.
Method One: System defaults to start
Because the database will be in the form of a service after MySQL is installed, the MySQL database automatically starts every time the system is started.
Method Two: Command Start method
Manually running the Winmysqladmin program in the Bin directory also enables you to start the MySQL database. (Figure 16)
Figure 16: Using the Winmysqladmin program to start the MySQL database
V. Summary:
At this point we have completed the MySQL database installation, initialization and connectivity debugging work, the next can be based on the actual enterprise to establish a database of various tables. Believe that the stable and efficient MySQL database for the enterprise business to provide good support.