Today is the 58th day for Liu Xiaoai to learn Java by herself.

Thank you for watching. Thank you.

Without further ado, let’s begin today’s lesson:

First, database overview

Database, as the name implies is to save the data warehouse, there are all kinds of database software on the market.

Speaking of database, Oracle has to be mentioned, it is a database vendor.

The first time I knew about the company was when I read an interview with Larry Ellison, Oracle’s boss, in an American newspaper.

Basically, he made all kinds of nice gestures to the U.S. government and then said he was going to impose sanctions on China, which caused a lot of discussion on the Internet.

Why mention him?

Because he was also the boss of Java, Java was acquired by him:

  • Oracle acquired Java in 2009 for $7.4 billion

  • In 2010, Oracle took Google to court

  • Eight years later, Google lost, paying Oracle $8.8 billion

$7.4 billion acquisition, $8.8 billion in immediate litigation, $1.4 billion in profit, not a very good deal.

Larry Ellison also starred in Iron Man 2 and was once rumored to be the original iron Man.

In short, the owner of a company with a bad reputation in the industry, but he is really good.

One of the characteristics of this company is that it buys things and charges for them, and Oracle charges for its databases.

The most used database in The country is MySQL, simply because it is free.

But it was also acquired by Oracle, and a paid version has been available since 6.0. At this stage, I mainly study MySQL database.

Problems encountered

Today I encountered a problem that caused me to crash while installing MySQL:

This step is stuck in the Starting Server.

Checked a lot of solutions on the Internet have not solved.

Uninstall the software, reinstall the software, delete the registry, delete the residual folder, shut down the firewall, restart…… All kinds of methods have been tried, but the problem could not be solved.

It was later found to be a service problem, and the solution is as follows:

Right-click on your computer and select Manage, find Services, press M to quickly find MySQL, right-click on properties, select Login, select Local System Accounts, and check allow to Serve desktop interaction.

You can use this method if you are stuck in the Starting Server step, but do not cancel the MySQL installation.

Ensure that the MySQL installation is complete.

MySQL installation details

MySQL 5.5.6: Install MySQL 5.5.6: Install MySQL 5.5.6: Install MySQL 5.5.6: Install MySQL

01

There are five options.

If the company has a dedicated server to install the server, the developer usually only installs the client.

Since this is learning time, select Custom Custom installation.

02

Open MySQL Server layer by layer:

X64 indicates a 64-bit operating system.

X86 stands for 32-bit operating system.

Today’s computers are generally 64-bit operating system, how to check their own computer operating system?

Right click on the computer and click on properties.

03

Installation directory and data directory.

You can customize the file path according to your personal habits, but you should remember the path and never change it.

My personal advice is to use the default installation path, which is drive C.

I have always heard that computer software should not be installed in C disk, which will make the computer card.

However, now they are generally solid-state drives. My own computer’s solid-state drives are divided into C drives, and the development tools are generally placed in C drives. IDEA is also installed in C drives, so that the operation is fast.

04

Click Execute.

A green check mark indicates success.

05

MySQL development mode Settings.

There are three categories: developer, server and pro.

MySQL takes up a lot of resources on your computer on both the server and professional versions.

There will be a dedicated server to install MySQL to handle data.

We are now learning phase, just install developers, otherwise the computer will be too heavy.

MySQL’s default port is 3306.

When LEARNING network programming, I also know that data transfer between computers needs to use ports.

06

Set a password. This goes without saying. Set one that you can easily remember.

Learning phase, the simpler the better, save time, anyway do not have to worry about data loss.

Add user, this is not used for the time being.

Because in the current situation, your computer is both a server and a client.

If it’s official development, there will be a dedicated server that will add our developer client to it.

07

Boot automatically.

Don’t say anything, or you’ll have to turn it on yourself every time.

I heard a lot of programmers don’t turn off the computer after work, just turn off the monitor.

Otherwise the next day to go to work to start the computer, all kinds of software to start configuration of what will take a lot of time……

08

Log configuration:

This is said to be very important for good programmers, because if there is a bug, they can check the log to find out exactly what the problem is, so far it is useless for me.

Bin means binary. This is to do what master slave copy, temporarily do not understand what is.

09

All the green ticks are on.

3. Configuration of environment variables

Once installed, you will find that MySQL also has no specific interface, no ICONS, shortcuts and so on. Like Java, it needs to be operated on the command line in DOS system, so it also needs to configure environment variables.

Why do YOU need to configure environment variables?

If not, we will only be able to run in the MySQ installation path on the DOS system, not in any other path.

The purpose of setting environment variables is to allow MySQL to run in any path.

01

Obtain the MySQL installation path.

The bin folder, again, is a binary folder, where everything that can be run is usually stored.

Java programs are also in the corresponding bin folder.

02

Right-click computer and click Properties.

Click advanced System Settings and select environment variables

03

Path is a Path.

Click Edit to add the MySQL installation path.

MySQL > run MySQL

Enter the command line in the DOS system:

Mysql -u root -p, enter the password. If the preceding information is displayed, the database is running successfully.

One of my personal habits is to memorize the words that correspond to the letters on the command line after you understand them.

  • -u, short for user, is the user name.

  • -p is short for password, which is the password.

In addition, IP and port are omitted in this command line. Why can they be omitted? Because my own computer is the host, I can omit it.

However, there must be a dedicated host in the actual development process. In this case, we need to write the corresponding host and port. The command is as follows:

Mysql -h 127.0.0.1 -p 3306 -u root -p

  • -h, host Indicates the host.

  • 127.0.0.1, this is still referring to the IP address of your computer, then change to the IP address of the corresponding host.

  • -p, Port stands for Port. This is uppercase, which is distinguished from the lowercase P of password.

The last

Thanks for watching.

If you can, please give it a thumbs up. Thank you.