Home Database Mysql Tutorial Mysql download, installation, deployment and graphical detailed operation tutorial_MySQL

Mysql download, installation, deployment and graphical detailed operation tutorial_MySQL

Aug 20, 2016 am 08:48 AM
mysql Install Configuration

Mysql is a tool that you must learn how to install and deploy. It is different from other fool-like applications/programs. It can be completed with one click. It is still difficult for beginners to install Mysql under Windows for the first time.

This article cooperates with the deployment of the front-end development environment in the previous article "Javaweb Development Environment Myeclipse6.5 JDK1.6 Tomcat6.0 SVN1.8 Configuration Tutorial" (click to open the link), thus forming the basic development of JavaWeb, JSP, and J2EE environment.

1. Download Mysql

First open the official website of Mysql (click to open the link). You can’t find it on Baidu. I also searched for a long time before I found the official website of Mysql5.1. I chose the version of Mysql5.1. The better the version, the better. The key is It’s stable


Choose the installation version of Mysql with MSI as the suffix. This thing is not like Tomcat. It is better to configure it according to the installation wizard.

Choose the corresponding version according to the different versions of the 32-bit operating system and the 64-bit operating system, but it seems that the problem is not big. The author personally tested the installation of 32-bit Mysql on a 64-bit machine, and there was no problem at all.

2. Mysql installation

1. After successfully downloading, you will get a mysql-5.1.73-win32.msi. Double-click to open it. The following will use Mysql5.0 as a screenshot to explain the installation of Mysql. After all, other versions of Mysql are similar or even no different


2. Run "setup.exe", the following interface will appear, the mysql installation wizard starts, press "Next" to continue:


3. Select the installation type. There are three options: "Typical (default)", "Complete (complete)", and "Custom (user-defined)". We choose "Custom", which has more options and is convenient for familiar installation. process.


4. Left-click on "Developer Components" and select "This feature, and all subfeatures, will be installed on local hard drive.", that is, "This section, and the contents of its subordinate subsections, all Installed on local hard drive", which is the second one. Developer Components (developer section) are turned off by default. Check the above "MySQL Server (mysql server)", "Client Programs (mysql client program)", "Documentation (documentation)" and do the same to ensure that all files are installed. Click "Change..." to manually specify the installation directory. If you want to change the installation path of Mysql, you need to change all parts of the directory, not just one!

5. Press "Next" to continue and confirm the previous settings. If there is an error, press "Back" to return and redo. Press "Install" to start the installation.


6. Next, start the installation. Mysql is not big and the installation is completed quickly. It does not take a long time to install like Sql Server 2005


7. Some old versions of Mysql may also display the following interface during this process:


Here you are asked whether you want to register a mysql.com account, or use an existing account to log in to mysql.com. Generally, this is not necessary. Click "Skip Sign-Up" and press "Next" to skip this step.

8. Until the software installation is completed, the following interface appears. There is a very good function here, the mysql configuration wizard. You don’t have to manually configure my.ini as before. Just put "Configure the Mysql Server now" in front of it. Check the box, click "Finish" to end the software installation and start the mysql configuration wizard.


9. The following is the mysql configuration wizard startup interface, press "Next" to continue.


10. Select the configuration method, "Detailed Configuration (manual precise configuration)", "Standard Configuration (standard configuration)", we select "Detailed Configuration" to facilitate familiarity with the configuration process.


11. Select the server type, "Developer Machine (development and testing type, mysql takes up few resources)", "Server Machine (server type, mysql takes up more resources)", "Dedicated MySQL Server Machine (specialized database server, mysql Occupy all available resources)", everyone chooses according to their own type, generally choose "Server Machine", it will not be too few, and it will not be full.


12. Select the general purpose of the mysql database, "Multifunctional Database (general multi-functional, good)", "Transactional Database Only (server type, focused on transaction processing, general)", "Non-Transactional Database Only (non-transaction processing) Type, relatively simple, mainly used for monitoring and counting. The support for MyISAM data types is limited to non-transactional). You can choose it according to your own use. I choose "Transactional Database Only" here and press "Next" to continue.


13. Configuring the InnoDB Tablespace is to select a storage space for the InnoDB database file. If it is modified, remember the location and choose the same place when reinstalling, otherwise the database may be damaged. Of course, do the database A backup is no problem, so I won’t go into details here. I have not modified it here. I use the default location and press "Next" to continue.


14. Select the general mysql traffic of your website and the number of simultaneous connections, "Decision Support (DSS)/OLAP (about 20)", "Online Transaction Processing (OLTP) (about 500)", "Manual Setting (Manual setting, enter a number yourself)", I choose "Online Transaction Processing (OLTP)" here, my own server should be enough, press "Next" to continue


15. Whether to enable TCP/IP connection and set the port. It is best not to change the port number here. After all, it is generally believed that Mysql occupies port 3306. This port is as great as the jerseys of some players on the football field and basketball court! If it is not enabled, you can only access the mysql database on your own machine. I enable it here and check the previous box. Port Number: 3306. On this page, you can also select "Enable Strict Mode" ) so that MySQL will not allow minor syntax errors. If you are still a newbie, I suggest you cancel the standard mode to save yourself trouble. But after becoming familiar with MySQL, try to use the standard mode because it can reduce the possibility of harmful data entering the database. Press "Next" to continue.


16. This is more important, which is to set the default database language encoding of MySQL. The first one is Western latin1 encoding, and the second one is multi-byte universal utf8 encoding. You can choose it directly. You can also choose the third one here. Then select or fill in "utf-8" in the Character Set. "gbk" and "gb2312" are obsolete. Now websites are written in internationalized utf-8. For some installed old databases mysql, before executing the data operation command, you need to run "set names utf-8;" (just run it once, utf-8 can be replaced with other values, depending on the settings here) , you can use Chinese characters (or other characters) normally, otherwise Chinese characters cannot be displayed normally. If you store things as garbled characters when programming, not only may there be problems with your own program, but there may also be problems with Mysql. Press "Next" to continue.


17. Choose whether to install mysql as a windows service, you can also specify the Service Name (service identification name), and whether to add the bin directory of mysql to the Windows PATH (after adding it, you can directly use the files under the bin without pointing out the directory name, for example, "mysql.exe -uusername -ppassword;" for connection. You don't need to point out the full address of mysql.exe, which is very convenient). I have checked all the boxes here, and the Service Name remains unchanged. If you don't start it, you have to start the service manually every time you use Mysql. Starting a service in Windows is very troublesome. If you don't want to install MySQL and cause your own operating system to get stuck, you'd better install MYSQL in a virtual machine and use it as your own development environment. Press "Next" to continue.


18. This step asks whether you want to change the password of the default root user (super administrator) (the default is empty). If you want to change the "New root password", fill in the new password here (if it is a reinstallation, and it has been set before You may make an error when changing the password here. Please leave it blank and remove the check mark in front of "Modify Security Settings" (change the password separately after the installation and configuration is completed). Fill in "Confirm (enter it again)" again to prevent Wrong entry. "Enable root access from remote machines (whether to allow root users to log in on other machines, if you want security, don't check it, if you want convenience, check it)". Finally, "Create An Anonymous Account (create a new anonymous user, anonymous users can connect to the database, but cannot operate data, including queries)" generally does not need to be checked. I usually set the user name to root and the password to root. Please remember this password, it will be very troublesome if you forget it. After setting is completed, press "Next" to continue.


19. Confirm that the settings are correct. If there are errors, press "Back" to return to check. Press "Execute" to make the settings take effect.


20. After the settings are completed, press "Finish" to end the installation and configuration of mysql - there is a common error here, that is, you cannot "Start service", which usually occurs on servers where mysql has been installed before. The solution is to ensure first The previously installed mysql server has been completely uninstalled; if not, check whether the previous password has been modified as mentioned in the step above, and follow the above operations; if it still does not work, back up the data folder in the mysql installation directory, and then delete it. , after the installation is completed, delete the data folder generated by the installation, move the backed up data folder back, and then restart the mysql service. In this case, you may need to check the database and then repair it to prevent data errors. . At this point, the installation and configuration of Mysql is completely completed.


3. Basic use of Mysql

Now Mysql can be used. Open Mysql->Mysql Command Line Client directly in the start menu, enter the password you just set, and you can use T-SQL statements to operate. MYSQL does not have a graphical interface without installing plug-ins. MYSQL uses a semicolon; to end a statement, not the Enter key. In addition to basic T-SQL statements, and the set encoding statement set names utf-8; just mentioned, Mysql also has the following statements:
 Show databases: show databases;
 Use databases: use database name ;
      Database creation command: create database shujuku;
Set permissions (user and password) for the database command: grant all privileges on shujuku.* to test@localhost identified by “123456”;
When you finish executing this command In the future, as long as you log in with username: test and password: 123456, you can only operate on the shujuku database. This avoids using root and is of great help to the security of the database. However, for the sake of convenience during general development, there is no need to set permissions like this. It is not like Sql Server 2005, which must open permissions before it can be called by external programs.
Enter "?" on the command line, and there will be simple help for the mysql command. To exit, it is "exit".


4. Mysql graphical

The so-called Mysql graphical installation is actually not as difficult as the installation of Mysql. You don’t even need to install it, it’s just a matter of decompressing the compressed package,

Please search for mysql-gui-tools-noinstall-5.0-r12-win32.zip on the Internet. Green versions are available for download from major websites.

It is best to use graphics. This does not mean that you should not use graphics if you are proficient in T-SQL statements. The key is that the work efficiency of graphics is significantly improved compared to entering commands!

After decompressing mysql-gui-tools-noinstall-5.0-r12-win32.zip, the key is two programs:


One is MySQLQueryBrowser.exe, which is used to view and look up tables. Enter the database and set the port number during installation. The first item of the port number is usually localhost. User name and password can easily view the database tables. If you don't you will need to use T-SQL to view the table.


One is MySQLAdministrator.exe. After entering the user name and password set during the database installation as above, you can use Restore to import the database and Backup to export the database. It is very simple. If you don’t use it, you need to do something like Export and import like "MySQL command line export and import database" (click to open the link).

At this point, all Mysql installations are complete!

The above is the entire content of this article. I hope it will be helpful to everyone’s study and I hope you will support me a lot.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1268
29
C# Tutorial
1244
24
Laravel Introduction Example Laravel Introduction Example Apr 18, 2025 pm 12:45 PM

Laravel is a PHP framework for easy building of web applications. It provides a range of powerful features including: Installation: Install the Laravel CLI globally with Composer and create applications in the project directory. Routing: Define the relationship between the URL and the handler in routes/web.php. View: Create a view in resources/views to render the application's interface. Database Integration: Provides out-of-the-box integration with databases such as MySQL and uses migration to create and modify tables. Model and Controller: The model represents the database entity and the controller processes HTTP requests.

MySQL and phpMyAdmin: Core Features and Functions MySQL and phpMyAdmin: Core Features and Functions Apr 22, 2025 am 12:12 AM

MySQL and phpMyAdmin are powerful database management tools. 1) MySQL is used to create databases and tables, and to execute DML and SQL queries. 2) phpMyAdmin provides an intuitive interface for database management, table structure management, data operations and user permission management.

MySQL vs. Other Programming Languages: A Comparison MySQL vs. Other Programming Languages: A Comparison Apr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

Solve database connection problem: a practical case of using minii/db library Solve database connection problem: a practical case of using minii/db library Apr 18, 2025 am 07:09 AM

I encountered a tricky problem when developing a small application: the need to quickly integrate a lightweight database operation library. After trying multiple libraries, I found that they either have too much functionality or are not very compatible. Eventually, I found minii/db, a simplified version based on Yii2 that solved my problem perfectly.

Laravel framework installation method Laravel framework installation method Apr 18, 2025 pm 12:54 PM

Article summary: This article provides detailed step-by-step instructions to guide readers on how to easily install the Laravel framework. Laravel is a powerful PHP framework that speeds up the development process of web applications. This tutorial covers the installation process from system requirements to configuring databases and setting up routing. By following these steps, readers can quickly and efficiently lay a solid foundation for their Laravel project.

MySQL for Beginners: Getting Started with Database Management MySQL for Beginners: Getting Started with Database Management Apr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

Solve MySQL mode problem: The experience of using the TheliaMySQLModesChecker module Solve MySQL mode problem: The experience of using the TheliaMySQLModesChecker module Apr 18, 2025 am 08:42 AM

When developing an e-commerce website using Thelia, I encountered a tricky problem: MySQL mode is not set properly, causing some features to not function properly. After some exploration, I found a module called TheliaMySQLModesChecker, which is able to automatically fix the MySQL pattern required by Thelia, completely solving my troubles.

MySQL: Structured Data and Relational Databases MySQL: Structured Data and Relational Databases Apr 18, 2025 am 12:22 AM

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

See all articles