MySQL Basics-Install MySQL

Source: Internet
Author: User

Yesterday went to an interview, the company is not too big, is a Japanese-funded enterprises, in the domestic have several branches, the interviewer asked the basic operation and performance optimization of MySQL, said a lot, it is more relaxed, but after the interview, think about it, the basic operation is still quite a bit, such as SQL nesting, The main time is long no, write the background directly with Hibernate,mybatis and other data persistence layer framework. The teacher used to teach SQL Server, remember that time learning is also good, learning is the standard SQL, can be run in a variety of SQL-supported database system, teachers often super-difficult to test us, but it seems I can make it, then very proud of the

Open-mouthed smile~~ later junior year to do the project with the basic is MySQL, so I also rarely contact SQL Server, its shortcomings listen to the enterprise teacher said there is a lot of, here I do not list, then the enterprise also opened the course of Oracle, I didn't listen to it.   Until yesterday, I suddenly remembered, I incredibly long time did not write SQL, so write a series of blog to explain the basic operation of MySQL, dare not say is the tutorial, can only say is their own review, there is the wrong place, welcome to the way the big God ~ ~ This blog post may look a bit long, That is because the steps are more detailed, each step has, the actual operation is particularly simple, do not mind Hollow, refueling   now as the server operating system generally has three kinds, Windows Server,linux,unix, Here we only introduce under Windows and Linux under Install Mysql,unix installation should be similar to Linux. 1. Open the https://www.mysql.com/in the browser, go to the official MySQL website, the domestic network open may be a bit slow, a little wait a bit 2. Select the downloads tag in the open Web page, such as:  3. On the tab that opens, swipe to the bottom of the page to see the words MySQL Community edition  Community (GPL) Downloads? , click Community (GPL) Downloads? such as:  4. On the page that opens later, click MySQL Community Server (GPL), such as:  5. In the subsequent open page can see the relevant downloads, such as:  in the first red box in the picture is the selection of the operating system, here we choose Microsoft Windows, we can see the second red box is recommended download, Here is to distinguish, if it is novice suggested click on this, because this version of MySQL does not have its own configuration, is the normal installation files, straight all the way next installed, if you want to learn more, then click on the other Downloads content area download, you can see the first two are the official version, The latter two are the debug version, the general choice of the first two, according to their own machine 32-bit or 64-bit selection download, download down is a zip file, installed their own configuration, relatively complex 6. If you choose MySQL installer to go to the page, the following:  select the second download to download, here, whether novice or veteran, will be asked to log in and then download, if no account can beTo register one, because now MySQL is owned by Oracle and has to follow this rule  mysql Installer 5.7:http://cdn.mysql.com//downloads/mysqlinstaller/ Mysql-installer-community-5.7.16.0.msimysql 5.7 Windows (x86, 32-bit), ZIP archive:http://cdn.mysql.com//downloads/ Mysql-5.7/mysql-5.7.16-win32.zipmysql 5.7 Windows (x86, 64-bit), ZIP archive:http://cdn.mysql.com//downloads/ Mysql-5.7/mysql-5.7.16-winx64.zipmysql Installer is only 32 bits, not 64 bits of 1. Double-click the installation file, you may see the following screen:  means that MySQL needs. NET Framework4.0 to continue the installation, then we'll install 2. Open http://www.microsoft.com/zh-cn/download/details.aspx?id=17718 with a browser, click on the download, you can download it very smoothly, download finished directly installed   3. Click Finish, and then double-click the MySQL installation file, this time to install the ~ 4 properly. Then there are some  5 that explain the protocol. Agree to the agreement, after the hook, click Next, then appear, select the installation options interface, generally choose the first line, this option contains some MySQL other components, such as MySQL workbench,mysql for Excel and so on, if only the MySQL database installed, Select Second server only on the line, here I chose the first  6. Click Next to check the required items, if the computer installed VC2013 runtime, Excel,visualstudio the first three items will automatically tick, because I am a virtual machine demo, so do not install these, click Next when the Warning box will appear, do not control it, direct click is Skip   7. Then there is the software and plug-in  8 that will be installed. Click Execute to start the installation, and so on after all the installation, click Next, the third item in the figure indicates that the installation failed, not to control it, is an ODBC data source, we generally do not use this 9. The configuration Interface  10 appears afterwards. Click Next to start the configuration, the first configuration is the MySQL operating mode and network, where config type indicates the mode of operation, if the installation of MySQL is to do development, directly select the first default on the line, the second server machine represents the operating mode for the server mode , these patterns will cause MySQL to occupy different system resources, the second configuration is network-related, indicating that the link to MySQL using the TCP/IP protocol, and specify the port number of 3306, these if there is no special requirements do not change  11. After the configuration is complete click Next, need to fill in the root user's password in MySQL, the minimum length is 4 bits, the second column can also add ordinary users, general development with no need to establish a user, direct use of root can, so we fill out the password after clicking Next 12. What you need to configure in the tablet is how MySQL runs, and the first radio box indicates whether the MySQL service is running as a Windows service, and Windows Server name represents the names of the MySQL service in Windows Server. The second radio box indicates whether MySQL is started automatically when the system starts, and the third radio box indicates which account the MySQL service runs on, and the basic of this page is next 13 directly. The following is a plugin and extension for MySQL, directly next 14. Then appear below the interface, directly click Execute 15. When you are finished configuring, click Finish 16. Then configure the MySQL instance and click on the next 17. Then click Check In, then click Next 18. Click on the execute 19. After execution, click Finish, go back to the main program, and then click Next 20. Then click on the finish finally, the configuration is finished ~ ~ ~ we start to verify, in the Start menu found MySQL 5.7 Command line Client open, then prompted to enter a password, enter the initial installation of the time you configured the password, Appears to indicate that you have successfully installed    1. First unzip the installation package you downloaded, get a name of MySQL ... The folder  2. Move this folder to the location where you want to install MySQL, that is, the directory you are moving to is the directory where MySQL is installed, such as my C:\Program files under 3. Open My Computer, properties,Advanced--environment variable, select path in the system variable, add after it: the path to your MySQL bin folder (e.g. C:\Program files\mysql-5.7.16-winx64\bin), note is append, not overwrite, and then determine  4. New folder in the MySQL directory data, also need to modify the configuration file, mysql default configuration file is the MySQL directory My-default.ini, such as mine is C:\Program files\mysql-5.7.16-winx64\ My-default.ini with Notepad open in which you modify or add the configuration, save close [mysqld]basedir= C:\Program files\mysql-5.7.16-winx64 (mysql directory) datadir= c \ Program Files\mysql-5.7.16-winx64\data (MySQL directory \data)  5. Run cmd as administrator (be sure to run as administrator, or not enough), enter the command CD C:\Program files\mysql-5.7.16-winx64\bin  carriage return  6. Then enter Mysqld--initialize-insecure--user=mysql return to  7. Then enter mysqld install return  8. Enter net start MySQL Enter to start MySQL service  9. From seeing that the MySQL service has started, we entered mysql-u root-p enter login MySQL database  10. Required to enter a password, just installed is no password, direct return   see has entered the MySQL, we enter show databases; Enter can see the database has been shown, this is not easier than the installation version of   This please see others write: http://jingyan.baidu.com/article/ fec7a1e5f8d3201190b4e782.htmlhttp://www.cnblogs.com/shenliang123/p/3203546.html Article Source: https://www.cnblogs.com/ Ayyl/p/5978418.html

MySQL Basics-install MySQL

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.