MySQL Common operations

Source: Internet
Author: User

Forgot password

1, MySQL5.7 in the installation directory of My-default.ini (My computer installed two MySQL database, and 5.7 shared 3306 port, MySQL5.6 in My.ini file) Add the statement: Skip-grant-tables

2, restart the service can

You can create a new user after connecting to the database, and then reset the password for the old user (the account that forgot the password)

Database backup

  Regular SQL backup operations of the database are done directly with the Navicat tool, but because some tables contain special characters that can break SQL statements (such as storing Word files in a database), you cannot restore them. So the safest way to do this is to back up the MySQL installation files and the data files under Programdata.

Take MySQL5.6 as an example, after the backup is complete, restore the database by doing the following:

1, modify My.ini:

Basedir= "D:/users/wanzhou/mysql"--the directory where MySQL installation files are located

Datadir= "D:/users/wanzhou/mysql Server 5.6/data"--the directory where MySQL data files are located

2. Install MySQL service: Mysqld-install

Start a service to connect to it

MySQL Common operations

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.