当前位置:网站首页>Mysql5.6.24 installation free deployment method

Mysql5.6.24 installation free deployment method

2022-06-12 10:26:00 Zi Jiao

mysql5.6.24 Installation free deployment method

One 、 register MySQL service
    1、cmd Next "E:\Program Files (x86)\mysql\bin”, And then execute mysqld -install Prompt that the service installation is successful ( Show :Service successfully installed.) 
    2、services.msc Start in MySQL Service for .


Two 、mysql5.6.24 How to set the password after successful installation
1、 edit MySQL Configuration file for :my.ini
     Generally in MySQL The installation directory has my.ini namely MySQL Configuration file for .
     Add the following line at the end of this configuration file :
    skip-grant-tables
     Save exit edit .
2、 And then restart MySQL service
     Execute... On the command line :
    net stop MySQL
    net start MySQL
3、 Set up the new ROOT password
     Then execute... On the command line :
    MySQL -u root -p MySQL or mysql -u root -p
     Enter directly and you can enter the database without a password .
     here , Execute... On the command line use mysql;
     Now let's execute the following statement to root Password updated to :
    update user set password=PASSWORD("root") where user='root';
    ( Be careful : Do not use... At this time mysqladmin -u root -p password ' Your new password ' This command changes the password , because 'skip-grant-tables' To configure ,
     Don't believe it , You can try , It will definitely report an error as shown below :
    F:\Documents and Settings\long>mysqladmin -u root -p password 'root'
    Enter password:
    Warning: single quotes were not trimmed from the password by your command
    line client, as you might have expected.
    mysqladmin:
    You cannot use 'password' command as mysqld runs
    with grant tables disabled (was started with --skip-grant-tables).
    Use: "mysqladmin flush-privileges password '*'" instead)
    exit sign out MySQL.
4、 Restore the configuration file and restart the service
     And then modify MySQL The configuration file adds the line just added 'skip-grant-tables' Delete .
     Restart again MySQL service , The password has been changed .
     With a new password root Have a try. , Can log in and re-enter mysql Look
    

    
3、 ... and 、mysql The solution to the problem that the prompt table does not exist  error: #1146 - Table 'xxxxxxx' doesn't exist
     The solution to the problem that the prompt table does not exist due to copying the database directly
     After the computer reinstalls the system, the original mysql data After copying in, most tables are accessible , However, several tables suggest that the table does not exist :

    error: #1146 - Table 'xxxxxxx' doesn't exist
     In this case, the original mysql The installation directory data Inside ibdata1 Copy it, too

    INNODB yes MYSQL Database is a popular database engine , Support transactions ( Row level ), Become possible in enterprise applications

    ibdata Data used to store files , The table files in the folder of the library name are just structures , Thanks to the new edition of mysql Try by default innodb, therefore ibdata1 The file exists by default , Without this file, some data tables will go wrong .

     If the data table is damaged, please try to repair the table :
    repair table tablename

    
    

原网站

版权声明
本文为[Zi Jiao]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203010525125502.html