Mysql download and installation, deployment and graphical detailed operation tutorial, mysql download and Installation
Mysql is a tool that must learn how to install and deploy. It is different from other silly applications/programs, it is difficult for beginners to install Mysql in Windows for the first time.
This article works with the deployment of the front-end development environment in the previous Java Web Development Environment Myeclipse6.5 JDK1.6 Tomcat6.0 SVN1.8 configuration tutorial (click to open the link, this forms the basic development environment for JavaWeb, JSP, and J2EE.
1. Download Mysql
First, open the Mysql official website (click to open the link). Baidu cannot find it. I also found Mysql5.1 official website for a long time. Select the version of Mysql5.1, the better the version is, the more stable it is.
Select the Mysql installation version with MSI as the suffix. This is not like Tomcat, but it is better to configure according to the installation wizard.
Select the appropriate version based on the 32-bit and 64-bit operating systems, but it does not seem to be a problem. I personally tested the installation of 32-bit Mysql on 64-bit machines, no problem.
Ii. Mysql Installation
1, after successful download to get a mysql-5.1.73-win32.msi, double-click open, the following will be Mysql5.0 to explain the installation of Mysql, after all, other versions of Mysql are similar, even no difference
2. Run “setup.exe. The following page is displayed. Start the mysql Installation Wizard and press "Next" to continue:
3. Select the installation type, which has three options: "Typical (default)", "Complete (Complete)", and "Custom (Custom)". Select "Custom ", there are more options to familiarize yourself with the installation process.
4. Click "Developer Components (Developer part)" and select "This feature, and all subfeatures, will be installed on local hard drive. ", that is," This part and its sub-parts are all installed on the local hard disk ", that is, the second one. Developer Components (Developer part) is disabled by default. Check that the preceding operations include "MySQL Server", "Client Programs (mysql Client program)", and "Documentation" 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 the directories of all parts, not just one!
5. Press "Next" to continue and confirm the previous settings. If any errors occur, press "Back" to return the redo. Click "Install" to start installation.
6. Install Mysql later. Mysql is not large and the installation is completed very quickly. It will not take a long time to install Mysql as SQL Server 2005 does.
7. Some earlier versions of Mysql may also display the following interface during this process:
This is to ask if you want to register an account for mysql.com or use an existing account to log on to mysql.com. Generally, this is not required. Click "Skip Sign-Up ", click "Next" to skip this step.
8. After the software installation is complete, the following interface is displayed. Here is a good function. mysql Configuration Wizard does not need to be configured manually like before. ini. Check the "Configure the Mysql Server now" and click "Finish" to Finish 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)", and "Standard Configuration". Select "Detailed Configuration" to familiarize yourself with the Configuration process.
11. Select the Server type, "Developer Machine (development and testing class, mysql occupies a small amount of resources)", "Server Machine (Server type, mysql occupies a large amount of resources) "," Dedicated MySQL Server Machine (Dedicated database Server, mysql occupies all available resources) ", you choose according to your own type, generally choose" Server Machine ", not too little, it will not be full.
12. Select the general usage of the mysql Database, "Multifunctional Database (general multi-function type, good)" and "Transactional Database Only (server type, focusing on transaction processing, General) "," Non-Transactional Database Only (non-transaction processing type, relatively simple, mainly used for monitoring and recording, the support for MyISAM data types is limited to Non-transactional ), I chose it with my own purpose. Here I select "Transactional Database Only" and press "Next" to continue.
13. configuring InnoDB Tablespace is to select a bucket for the InnoDB database file. If you modify it, remember the location and select the same place during reinstallation, otherwise, the database may be damaged. Of course, it is okay to back up the database. We will not detail it here. I have not modified it here. Use the default position and press "Next" to continue.
14. Select the average mysql access volume of your website and the number of connections at the same time. For example, "demo-support (DSS)/OLAP (about 20)" and "Online Transaction Processing (OLTP) (about 500) "and" Manual Setting (manually set, enter a number by yourself) ". Here I select" Online Transaction Processing (OLTP) "and my server, enough. Press "Next" to continue.
15. Whether to enable the TCP/IP connection and set the port. The port number here should not be changed. After all, Mysql is generally considered to use 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 will enable it here and mark the previous one with Port Number: 3306. on this page, you can also select Enable Strict Mode, so that MySQL will not allow small syntax errors. If you are a newbie, I suggest you cancel the standard mode to reduce the trouble. However, if you are 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 very important. It is to set the default mysql database language encoding. The first is the latin1 encoding of the West, and the second is the multi-byte universal utf8 encoding, which can be selected directly, you can also select the third Character here, and then select or fill in "UTF-8" in Character Set, "gbk" and "gb2312" are outdated, currently, all websites are written in UTF-8 format. For some installed old mysql databases, run the "set names UTF-8;" command before executing the data operation command (only once, UTF-8 can be replaced with other values, depending on the settings here), you can use Chinese characters (or other texts) normally. Otherwise, Chinese characters cannot be displayed normally. During programming, the storage is garbled. In addition to your own programs, Mysql may also have problems. Press "Next" to continue.
17. Select whether to install mysql as a windows Service, specify the Service Name (Service ID Name), and add the mysql bin directory to the Windows Kernel-uusername-ppassword##directory. Then, the complete address of mysql.exe is displayed, it is very convenient), I have checked all of them here, and the Service Name remains unchanged. If you do not start the service, you must start the service manually every time you use Mysql. It is very troublesome to start a service in Windows. If you do not want to install Mysql to cause your own operating system card, you 'd better install MYSQL on the VM and use it as your own development environment. Press "Next" to continue.
18. In this step, check whether you want to change the password of the default root user (Super Management) (empty by default). If you want to change the "New root password, enter the new password here (if you have already set a new password, changing the password may cause an error. leave it blank and remove the check mark before "Modify Security Settings, after the installation and configuration are complete, change the password.) Enter "Confirm" again to prevent errors. "Enable root access from remote machines (whether to allow root users to log on to other machines. If you want security, do not check it. If you want convenience, check it )". "Create An Anonymous Account (Create An Anonymous user, and the Anonymous user can connect to the database, and cannot operate data, including queries)" is not checked. I usually set the user name to root and the password to root. Remember this password and it is very troublesome to forget it. After setting, press "Next" to continue.
19. confirm that the settings are correct. If the settings are correct, press "Back" to return for the check. Press Execute to make the settings take effect.
20. After setting, press "Finish" to complete mysql installation and configuration. A common error is that the "Start service" is not allowed ", it usually appears on the server where mysql was previously installed. To solve this problem, first ensure that the previously installed mysql server is completely uninstalled. If not, check whether the above steps are followed, check whether the previous password has been modified. If not, back up the data folder in the mysql installation directory and delete it. After the installation is complete, delete the data folder generated by the installation, move the backup data folder back, and restart the mysql service. In this case, you may need to check the database and fix it once, prevents data errors. So far, Mysql installation and configuration have completely ended.
III. Basic use of Mysql
Now Mysql can be used, directly open Mysql-> Mysql Command Line Client in the Start Menu, enter the password just set, you can use the T-SQL statement for operations. MYSQL does not have a graphical interface when plug-ins are not installed. MYSQL ends a statement using a semicolon instead of the Enter key. In addition to the basic T-SQL statement, and just mentioned the encoding statement set names UTF-8;, Mysql also has the following statement:
Show database:Show databases;
Database usage:Use Database Name;
Database creation command:Create database shujuku;
Run the grant all privileges on shujuku. * to test @ localhost identified by "123456" command to set database permissions (user and password ";
After you execute this command, you only need to operate the database shujuku when you log on to shujuku with the username: test and password: 123456. This avoids the use of root, it is of great help to database security. However, in general development, for convenience, there is no need to set the permission. Unlike SQL Server 2005, the permission must be opened before it can be called by external programs.
Enter "?" on the command line, There will be a simple help for mysql commands. exit is "exit ".
Iv. Mysql graphical
The so-called Mysql graphical interface is not as difficult as Mysql installation. You don't even need to install it. It is just a compressed package for decompression,
Go to mysql-gui-tools-noinstall-5.0-r12-win32.zip for a self-propelled netbook. Download the green version from all major websites.
It is best to still graphical, not to say That you T-SQL statements skilled do not graphical, the key is graphical work efficiency than the input command has significantly improved!
After extracting mysql-gui-tools-noinstall-5.0-r12-win32.zip, the key is two programs:
Mysqlquerybrowser.exe is used for viewing tables and table queries. Enter the database port number set during installation. The first item before the port number is generally localhost. the user name and password can easily view the database table, if you don't need to, you need to use a T-SQL to view the table.
Mysqladministrator.exe. After you enter the username and password set during database installation, you can use the Restore to import the database and Backup to export the database. If you do not need it, you need to export and import the database like MySQL command line export and import database (click to open the link.
So far, all Mysql installation is complete!
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.