Simplified mysql Log adding Function

Source: Internet
Author: User

Perform Two-layer development and use mysql for database.
Based on your experience and the methods provided by colleagues on the network, you can remove unnecessary files and create a mysql mini version. It is very convenient to use, with a size of 5 MB and convenient to carry.
However, the log is lost, which is inconvenient to debug the program.
I found the information. There are two ways to add logs to mysql:
Start with command line
Mysqld-nt.exe --logtaillog.txt

Start as a configuration file
Mysqld-nt.exe -- defaults-file = "g: \ mysql \ v5.0.67 \ bin \ my. ini"
Add a line to the [mysqld] section of the my. ini file.
Logstores log.txt

The default log file is in the data folder.

In addition, mysqld-nt occupies 15 MB of memory at startup. If you are feeling tight, you can add parameters to skip unnecessary database engines.
-- Skip-bdb -- skip-innodb
In this way, only the MyISAM engine is used, and only 6 MB of memory is required.
Of course, if you cancel the innodb engine, there will be no locks.


Author: "breeze and chaos"

Related Article

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.