Install and configure MySQL

Source: Internet
Author: User

I. MYSQL Database concept
1. Database Management System (DBMS) is a software used to manage and manipulate data, including SQL server, mysql, access, oracle, and other database management systems.
2. database application system (DBAS) is a system developed by programmers for users, such as student management system, library management system, and online voting system.
Ii. MYSQL Installation
1. You can modify the data file placement path during installation.
2, in the installation process to modify the character encoding, the default character encoding is Latin1 does not support Chinese, we need to change it to the international standard character encoding UTF-8, if you only need to simplified Chinese, we can change it to gb2312 or gdk.
3. A start service error may occur during installation.
Solution:
(1) first Delete mysql in the control panel.
(2). Delete the mysql directory under drive C: \ Program Files.
(3) If you still have a set directory on another disk, you must also delete the. Empty directory.
(4) regedit the Registry
HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Eventlog/Applications/MySQL
HKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services/Eventlog/Applications/MySQL
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Applications/MySQL
If yes, delete all! (Tip: Use F3 to search for "mysql" cyclically ")
(5) If the mysql content in the task manager is also deleted
(6) shut down the firewall.
(7) reinstall mysql (I have not restarted the computer)
Restart the computer, disable IIS, and delete temporary files in temp if necessary.
If this is not the case, change the mysql service name When configuring mysql.
4. The installation is successful, as shown in



Note: If the entered password is incorrect, the command box will be closed. If the password is correct, the command box will be closed, that is, the mysql service is not started and you need to restart the service.
Iii. MYSQL configuration and management
1. Start and Stop the MYSQL Service
(1) start and stop the service in "Computer Management.
(2) input the command character (net start mysql/net stop mysql) in DOS)
2. Two login methods for MYSQL
(1) directly log on to mysql 5.5 Commad Line Client and enter the logon password. Then, access the database.
(2) log on at the doscommand prompt
Go to the dossystem and enter the installation directory for installing mysql (if environment variables are set, enter the command directly .)
Enter the mysql-uroot-p password and press enter to enter MYSQL.
 
 

3. Change the password
Go to the mysql installation directory under DOS, enter the command mysqladmin-uroot-p Original password new password, and then directly log on with the new password to enter the database creation operation
 
4. forgot password
(1) Stop the mysql Service
(2) Find the my. ini configuration file.
(3) enter the command skip-grant-tables under [mysqld ].
(4) Start the mysql service and log on with any password. After logging on, you must change the password.
(5) The password can be changed as follows:
Use mysql (mysql is the built-in database)
Update user set password = password ('new password') where user = 'root'; (must be added; No)
(6) After modification, delete skip-grant-tables and restart the service.
5. If you want to modify the character encoding after installing MYSQL, you can modify it from the configuration file my. ini. Be sure to restart the service after modification.
Note: (1) in mysql, each SQL statement must end;
(2) The username of the mysql administrator is root.



The author looks up at Lavender

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.