Blog. csdn. netkuanglong2016articledetails38879979 background. In this case, the best way is to extract the files necessary for MySQL to run. Concepts and
Http://blog.csdn.net/kuanglong2016/article/details/38879979 background knowledge when we develop software especially when creating installation package needs to use MySQL Database Service, but does not need all functions in MySQL package, and the official MySQL package is particularly large. In this case, the best way is to extract the files necessary for MySQL to run. Concepts and
Http://blog.csdn.net/kuanglong2016/article/details/38879979"
Background
The MySQL database service is required when developing software, especially when creating the installation package, but not all functions in the MySQL software package, and the official MySQL package is very large. In this case, the best way is to extract the files necessary for MySQL to run.
Concepts and Principles
Starting MySQL Database Service does not require all files in all MySQL packages
Procedure
- Download file: MySQL Community Server zip package, decompress
- Copy required files: Keep the directory structure copy the following files and folders to a new folder (such as mysql), and then modify my-*** as needed -***. ini content, and rename it to my. ini
- Mysql.exe, mysqld.exe, mysqldump.exe, and mysqladmin.exe
- Data Directory
- Share/english/errmsg. sys
- My-small.ini or my-large.ini or... (select an appropriate profile based on business scale)
- The mysql directory copied above contains the files required to create a MySQL service.
- Start mysql Server: Use cmd to enter the new mysql/bindirectory and run mysqld.exe. If cmd is stopped, the service is started successfully.
- Stop mysql Server: mysqladmin-u [username]-p [password] shutdown (Ctrl + C cannot be used)
- Start the mysql client: Use another cmd to access the mysql/bindirectory and run mysql.exe to test whether the client is successful.
- Install/uninstall the MySQL service:
- Run cmd with administrator privileges
- Go to the mysql/bin directory
- Run mysqld.exe -- install (install) [service name]
- Run mysqld.exe -- remove (uninstall) [service name]
- If the installation or uninstallation is successful, the system returns the success message.
- Win + R, execute services. msc to view system services
- Start/stop MySQL service: (administrator privilege)
- Net start mysql
- Net stop mysql
Summary
None
References
None