In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
After using MySQL, regardless of capacity, I found that it was much easier to use than the other two (sql server and oracle), and I fell in love with it at once. The following is to write down the specific methods and steps for those children's shoes who do not know how to get them.
I wrote this in a little too much detail, even a little tedious, and there are many steps that have been omitted in other tutorial documents, but I still have to write it out, because I took a lot of detours at that time. I hope you can avoid these detours I took. Of course, you can skip those who know your classmates and choose the place you want to know.
The first big step: download. (you don't need to register to download it. Click the no thanks below)
a. As the saying goes, "A skilful wife cannot make bricks without rice". I use the ZIP Archive version here, and the win7 64-bit machine supports this, so I recommend using this all. Because it's simple, and it's clean.
The address is shown in the picture
Pull down the bottom, take a good look at 64bit ZIP Archive, and click Download.
b. After clicking, you will go to another page, but do not start downloading. Don't be afraid at this time. It doesn't matter if you don't understand. You just need to know that he wants you to log in (login) or apply for an account (sign up). After logging in or applying for a successful application, you will start downloading. Remember that passwords should be a combination of letters and numbers, and letters should be capitalized.
c. Note: passwords should be a combination of letters and numbers, and letters should have uppercase letters
d. Of course, if you have an account, you can log in directly.
Click DownNow after success. The file is not big, just more than 200 M, very soon, wait a moment (after success, it is supposed to arrive at the following place, but if you do not know such words, you find it yourself, or directly back out, repeat the above steps, choose to log in that one.
In addition, MySQL is an open source (open source) database, which means that you can view the source code. I believe many children's boots will be interested in this. So where to get the source code?
When I first entered-(the address in the first picture). If you have a Select Platform, just select the source code below.
(by the same token, if you want to download MySQL under the linux platform, you are also looking here.)
After the download, let's start with the installation and configuration
Second step: install (decompress)
The ZIP Archive version is installation-free. All you have to do is decompress it. It's no different from the installation version, but it doesn't need to be installed. Find the downloaded mysql-x.x.xx-winx64.zip right select (extract to.), find the place you want to install, like to put C: disk, choose C: disk, do not like to choose one, editor likes to put D: disk, after all, c: system disk put too many things is not good. Ok after decompression, isn't it very simple? You know the benefits of the ZIP Archive version?
Are you going to ask? How do I use it? \ bin the mysql in the click. How did exe come out of a black window and there was no response?
There is no response because the service is not open yet!
It's not open. Why don't you just open it?
The service is not installed yet!
How to install it?
Let's talk about it!
Third step: configure the default file
In fact, in theory, we can install the service directly now, but because it is the default configuration, there will be a lot of problems when we use it. For example, the Chinese characters in it are all garbled, so it is recommended that you configure the default file first. Under the mysql-x.x.xx-winx64 directory (editor 5.6.17 according to your version), create a new my.ini. Copy the following code and save it to ok. My.ini replaces the following my-default.ini file. The .ini file is the configuration file in window. Save all kinds of default data inside. The installation version is to let you choose during the installation and then the system saves it for you. Zip archive is written by yourself, all the same. What does the code syntax mean? children's shoes check the relevant information by themselves. After all, I can't say a word or two. This file is loaded when the software is running.
Code: (change D:\ mysql\ mysql-5.6.17-winx64 to your own software path, save)
Copy the code
Copy the code
[mysql]
Set the mysql client default character set
Default-character-set=utf8
[mysqld]
# set port 3306
Port = 3306
Set the installation directory for mysql
Basedir=D:\ mysql\ mysql-5.6.17-winx64
Set the directory where the data in the mysql database is stored
Datadir=D:\ mysql\ mysql-5.6.17-winx64\ data
Maximum number of connections allowed
Max_connections=200
The character set used by the server defaults to the 8-bit coded latin1 character set
Character-set-server=utf8
The default storage engine that will be used when creating new tables
Default-storage-engine=INNODB
Copy the code
Copy the code
Step 4: install the mysql service
A start-> enter cmd in the face search bar, there will be a cmd.exe, do not rush to make sure, right-click the cmd.exe and select an administrator to run this option. Otherwise, there will be an error code with insufficient identity, and the exact number has been forgotten. This is a feature of win7. I just need to know. If my.ini is misspelled, the error code is 1067.
(you can also find the cmd.exe in the C:\ Windows\ System32 directory, and right-click it to confirm as an administrator. )
After opening the cmd window as an administrator, change the directory to the bin directory where you unzipped the files. My directory is the one in the picture. In your case, your own directory shall prevail. Then enter mysqld install and enter to run it. Note that it is mysqld, not mysql.
If the installation is successful, it will be ok. Since I have already installed it, this is the result.
Then type net start mysql to start the service. Or do not bother to manually, open the service and start the mysql service manually.
Tell you a simple way for win7 to open the service interface. Open Task Manager (right-select Task Manager or ctrl+alt+delete, whatever you like). Click the following service to ok, is it very simple, much easier than the control panel method? Of course, you can also type services.msc in the cmd window.
Step 5: open MySQL
Or change the directory to D:\ mysql\ mysql-x.x.xx-winx64\ bin (what x.xx.xxx is based on your own version) and type mysql- uroot-p. There is no password by default. Enter, of course, mine has been set the password, so you have to enter the password to enter. If you have a password, you can use the mysql-uroot-p password, or you can enter the mysql-uroot-p password by pressing enter. The second one is recommended. You will know the reason after you do it.
How to set the password: mysqladmin-u root-p password password.
Just quit exit. Remember to close the cmd window directly is not to exit, you have to type exit to exit ah.
Although you have opened mysql, isn't it annoying to enter so many instructions to change directories every time you open mysql? How do I do that? Yes, of course, I don't have to say it, and there's no need to worry. I'll tell you.
Right click on my computer-> Properties-> Advanced system Settings-> Environment variables-> path- > Edit, and put the full path of the bin directory under your mysql software inside. I suggest that children's shoes be put at the front and finally put an English semicolon (;) after the path of that directory. Such as D:\ mysql\ mysql-x.x.xx-winx64\ bin
Why do you do this? What is the principle? To put it simply, the path path in the environment variable is the search directory path of the cmd system. You enter an instruction, how does the system know if it has it or not? What did the system do? In fact, the system looks for all the paths in the current directory and the system environment variable path, and finds the first one. If you can't find it, you will report an error. So we either change the cmd directory every time, or we set it up, and we don't need to change the cmd path in the future.
For example: the system is like a bus. Follow the established route. The path in the environment variable is that route or each station. Get off (run) at the station (find the first one).
Now that the environment variables are ready, let's run it again.
Cmd- > mysql-uroot-p-> enter password-> show databases; search database-> use database name; switch database directory-> show tables; lookup table-> sql query work select * from table name-> exit exit.
Other instructions are input database operation matters, the editor will not repeat, you can find some related books.
Editor is more like to use cmd window to operate mysql, you get used to it and find it is so convenient and fast. It's much easier to use than the graphical interface, and if you give mysql a graphical interface, you lose its good meaning compared to the other two databases. Editor strongly does not recommend you to use graphical interface to operate mysql database. But I can't help it if you really want to use it. I would like to recommend several graphical management tools for you:
1 、 phpMyAdmin
2 、 MySQLDumper
3 、 Navicat
4 、 MySQL GUI Tools
5 、 MySQL ODBC Connector
How to install these tools? I believe there will be many tutorials like mine on the Internet. You can look for them.
Additional steps: slim down for your mysql
Have you found a problem? when you download a mysql package, it is only a little more than 200m, but it can only reach more than 1G. Right-click your mysql-x.x.xx-winx64 directory and select the properties to see its size. Why is this the case? in fact, it is still the same problem. Mysql is an open source database, in which the source files and debug files have not been deleted. In fact, these files are useless, just delete them. Delete dubug files and .pdf files. Of course there's more than one catalog. Look for it yourself, but don't delete it wrong. After deleting it, do you find it is much smaller!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.