MySQL start learning

Summer vacation when unknowingly had a security MySQL, incidentally also installed a Navicat. . . , I was speechless, but also installed in c drive

As for why I would be so Shadiao

I was drunk ,,,

Then I now MySQL and others is different, and now my MySQL

Is like this, there is in dos not start, I know the environment might be to go with it or not.

In fact, it can be equipped with the environment

Links with the environment: https://jingyan.baidu.com/article/c1a3101e72fc9bde656debf7.html

  1. Use Win + R shortcut to open the dos command window, locate the bin directory under the MySQL installation directory, such as D: \ Program Files \ MySQL \ MySQL Server 5.7 \ bin to use if the current dos system is not in this directory: cd / DD: \ Program Files \ MySQL \ MySQL Server 5.7 \ bin handover command, windows system is case insensitive, as shown in FIG.

    Description MySQL configuration and environment variables
  2. 2

    At the command prompt, enter your mysql mysql -u user name -p, installed above mysql database using the default user name root, so enter the command: mysql -u root -p and then return, according prompted for a password, that is, you can see the mysql command prompt, then you can enter the MySQL command.

    Description MySQL configuration and environment variables
  3. 3

    But every time you switch directories lot of trouble, especially every time navigate to the bin directory. That there is no better way to solve this problem? Here are just one way to configure the environment variables, add the MySQL commands to the system environment variables, if the shoes had jdk installation must be very familiar.

    END

Local MySQL installation configuration environment variable

 
  1.  

    In the desktop select "This computer" icon, right click -> Properties -> Click "Advanced System Settings" ->

    Click the "Environment Variables."

    Description MySQL configuration and environment variables
  2.  

    New MYSQL_HOME variable and set the value to D: \ Program Files \ MySQL \ MySQL Server 5.7.

    Description MySQL configuration and environment variables
  3.  

    Edit the Path system variables: system variables, find the Path variable, click on the "Edit" button and we will;% MYSQL_HOME% \ bin added to the path variable (usually on the last face), note that if there are other front configuration, English must be preceded by a semicolon (half-width). MYSQL_HOME is not necessary, in order to later reinstall mysql easy to change in a different directory, after all, the Path system variables are more error-prone modifications, it can also be added directly in the Path variable:

    D:\Program Files\MySQL\MySQL Server 5.7\bin

    Description MySQL configuration and environment variables
    Description MySQL configuration and environment variables
  4. 4

    And then re-open the dos which can enter commands directly in any position, no need to locate bin directory, as it has been added to the bin directory environment variable, the system will look for themselves. At this point we enter in any location, such as under the root directory in D: mysql -u root -p mysql can open a command prompt.

    Description MySQL configuration and environment variables

After which you will find in dos can be used

Since then I have installed Navicat Navicat you can use to connect my mysql,

Then when my connection out of the question

This problem is solved I will add the skip-grant-tables to

Open this file

Add to here on the line, then you do not even password input can directly enter the mysql. . . , Ha ha ha, when you want to engage someone else's database you can add the others in this document. . .

Guess you like

Origin www.cnblogs.com/WildSky/p/11617523.html