Today, we want to package the WEB project into EXE, but the database is stuck. System Error 1067 occurs when the Database Service is started.
Today, we want to package the WEB project into EXE, but the database is stuck. System Error 1067 occurs when the Database Service is started.
The solution is as follows:
1. Delete the mysql service first.
Control Panel-> Administrative Tools-> services, stop the mysql service first
Start-> Run-> Enter cmd-> SC delete mysql
Delete Service
2. modify my. ini
If it is not created (refer to the settings below)
[Mysqld]
# Set basedir to your installation path
Basedir = c:/mysql (mysql directory)
# Set datadir to the *** of your data directory
Datadir = c:/mysql/data (mysql directory/data)
[WinMySQLAdmin]
Server = c:/mysql/bin/mysqld-nt.exe
3. Start the service
Appendix: start the service bat: (put it in the mysql root directory)
The Code is as follows:
@ Echo off
If not exist mysqlServer5 \ data \ % computername %. pid goto startsvr
Net stop MySQL
MysqlServer5 \ bin/mysqld-nt.exe -- remove MySQL
: Startsvr
Echo MySQL service is starting .....
MysqlServer5 \ bin \ mysqld-nt.exe -- install MySQL -- defaults-file = "% cd % \ my. ini"
Net start MySQL
Pause
MySQL installation and backup
1. Download MySQL
Http://www.mysql.org/downloads
Ii. Installation Process
1. Decompress mysql-noinstall-5.0.51b-win32.zip to a directory.
Assuming MYSQL_HOME = C: \ mysql-5.0.51b-win32
2. Compile the mysql running configuration file my. ini.
My. ini
----------
[Mysqld]
# Set the installation directory of mysql
Basedir = $ MYSQL_HOME
# Set the data storage directory of the mysql database, which must be data or \ xxx \ data
Datadir = $ MYSQL_HOME \ data
# Set the character set of the mysql server
Default-character-set = utf8
[Client]
# Set the character set of the mysql client
Default-character-set = gbk
----------
3. Install the mysql Service
Enter directory C: \ MS-DOS \ bin from the mysql-5.0.51b-win32 window,
(Put my. ini under the C: \ mysql-5.0.51b-win32 \ directory !)
Run the following command:
Mysqld-install MySQL5-defaults-file = C: \ mysql-5.0.51b-win32 \ my. ini (Service Installation successful! But a system error 1067 occurs)
Mysqld-nt.exe-install (Service Installation successful! And started successfully)
4. Start the mysql database
In the above command window, enter the command: net start MySQL5
In this way, the mysql service is started.
5. delete a service
Execute mysqld-remove MySQL5.
-------------------------
MySQL backup often has the following methods:
1. phpmyadmin is used, but with this backup, the data size should be less than two megabytes, and it will not be able to be restored if it is too much. It is quite useful for small data backups!
2. Use the back-end backup tool that comes with the program software to back up the data. In this way, there is generally no size limit on the data backed up. After the backup, you need to install the program once in the new space, then log on to the background and use the restoration tool provided by the background to restore the new data, such as discuz, phpwind, bo-blog, etc ...... All of them can be backed up in this way!
3. Use other SQL tools for software backup: the advantages of the Empire backup King are better, and the database size is unrestricted, but the program is zend, and there are many backup program files.
Another software is faisunsql. The database size is not limited. The backup program exports a file, which is easy to import and operates the database directly. (Recommended)