Add MySQL to a Windows system service:
1. Install the service.
After windows is installed, MySQL is not installed as a service. You must run the following statement to register MYSQL as a service: installdir/MySQL/bin/mysqld-NT -- install.
There is no service concept in Windows 98, so you do not need to install the service.
2. Start the service
In Windows2000, you can start the MySQL service: Net start MySQL after installing the service.
In Windows 98, run the following command to start the service: C:/MySQL/bin/mysqld. After the service is started, it runs in the background and has no interface.
3. Stop the service
In Windows2000, run the following command to stop the MySQL service: net stop MySQL.
In Windows 98, run the following command to stop the service: C:/> C:/MySQL/bin/mysqladmin-u root shutdown:
4. Uninstall the service
Run the following command to uninstall the MySQL service: installdir/MySQL/bin/mysqld-NT -- remove.
After the above installation, we can use it. You can build a database that is empty in our system into the MySQL data directory. The default database directory is installdir/MySQL/data.
You can use the dbexpress component to access the MySQL database. The dbexpress component is a group of efficient database access components. If you change the connection string, you can directly connect the data source to databases such as MSSQLServer.
After deleting the original mysql4.1 system service, I downloaded a 5.0 non-Install Version and added it to the Windows System Service. Why can't I start it? -Error 1056
1. Error: Can't Find messagefile F:/program files/MySQL/share/english/errmsg. sys'
Cause: the original version 4.1 is installed in the F:/program files/MySQL directory, while the current version 5.0 is in the F:/database directory.
Solution: Find the my. ini file in the C:/winnt/directory, modify or delete it.
2. Error: Ready for connections.
Version: '5. 0.21-Community-nt 'socket: ''port: 3306 MySQL Community edition (GPL)
Cause: the socket is empty, MySQL is not configured; or the port is occupied.
Solution: Run mysqlinstanceconfig.exe in the/MySQL/bindirectory to configure the MySQL instance.
How to change the executable file path in the MySQL attribute of Win2000 service!
MySQL is installed on disk D at the beginning. After the disk is uninstalled, format the disk D and install it again. The path is different from the original path and cannot be started through "Net start MySQL. View the properties of MySQL in Win2000. the executable file path is on disk D. How can I change it now or remove MySQL from the service item?
HKEY_LOCAL_MECHINE---SYSTEM in the Registry --- CurrentControlSet
Several solutions to errors when starting the MySQL Service
1
After installing MySQL, I changed the root password and started it with net startmysql. run the following command: C:/MySQL/bin/mysqladmin-u root-P shutdown and then Net start MySQL!
*************
2
MySQL error 1067
Q: I encountered a 1067 error in MySQL.
Error message:
A system error has occurred.
System Error 1067 has occurred.
The process terminated unexpectedly.
A: The solution on my machine is:
Modify % WINDIR %/My. ini and add
[Mysqld]
# Set basedir to the MySQL installation path
Basedir = D:/Program/tools/MySQL
Datadir = D:/Program/tools/MySQL/Data
*************
3
It's done !!!
It seems like this ......
The mysql_install_db script only needs to be run once during the initial installation, and does not need to be run any more. I set MySQL. server copy to/etc/rc. d/init. d/, run chkconfig MySQL. the MySQL server starts automatically every time it starts up. You only need to set the path and enter MySQL on the command line!
It seems that the process of exploration is really painful. It has been suffering me for several days ......
*************
4
Q: I encountered a 1067 error in MySQL.
Error message:
A system error has occurred.
System Error 1067 has occurred.
The process terminated unexpectedly.
A:
Solution:
1. Check whether your MySQL directory has the System user permission.
2. delete your % WINDOWS %/My. ini file.
3. Check whether your C:/My. CNF file is correctly configured.
*************
5
[☆☆☆Mysql summary ☆☆☆]
The default installation directory of MySQL is C: mysql. After the installation is complete, there is no message indicating that the installation is complete. Click the finish button and then exit. If you want to install it in another directory, we recommend that you first install it in C: MySQL, and then move the entire directory to the desired place. For example, after moving to D: MySQL, You need to edit D: mysqlmy-example.cnf (*. CNF files will be registered as speeddial files in Windows 2000 and cannot be operated in the resource manager. Use the command line to start notepad editing, such as running notepadd: mysqlmy-example.cnf, however, this file is in the format of a text file in the Unix system. You can use write to open and edit the file because it cannot be entered correctly in notepad,
Or use write to open and save it once, and then use NotePad to edit it .) Find a line in basedir, remove the comment "#", change the path to the moved directory (the directory separator should use a slash instead of a backslash), and save it as: C: My. CNF MySQL started in service mode if it is stopped using net stop MySQL, an error message is returned, for example:
C:> net stop MySQL
The MySQL service is stopping.
System error.
The system has a 1067 error.
The process stops unexpectedly.
The MySQL service has been stopped successfully.
This does not matter. MySQL has indeed stopped. However, if you do not want to see any error message, you can use the following command to stop:
C:> mysqlbinmysqladmin-u root Shutdown
If no message is displayed, MySQL has been stopped successfully.
It should be noted that although MySQL is known to be simple to install and easy to use, it is an SQL-based database management system after all. If it is not very proficient in SQL, I am afraid it cannot be used for anything.
**************
6
Solution to MySQL service failure
MySQL service cannot be started
My operating system is Win XP
No matter what version of MySQL is installed, an error will be reported midway through the MySQL service started in the management tool.
Content: unable to start MySQL service on local computer error 1067: Process aborted unexpectedly
The solution is as follows:
Find my. INI file, edit the content (if the file does not exist, create a new one), including at least two basic configurations: basedir and datadir.
[Mysqld]
# Set basedir to installation path, e.g., C:/MySQL
# Set it to the MySQL installation directory
Basedir = D:/www/webserver/MySQL
# Set datadir to location of data directory,
# E.g., C:/MySQL/data or D:/mydata/Data
# Set it to the MySQL DATA DIRECTORY
Datadir = D:/www/webserver/MySQL/Data
In addition, you need an idea
[Winmysqladmin]
Server = D:/www/webserver/MySQL/bin/mysqld-nt.exe
User = root
Password = XXXXXXXX
# The above is the configuration for setting winmysqladmin
[Client]
User = root
Password = XXXXXXXX
Hehe ~ Solved
**************
7
Just completed MySQL "keyword 1067 error 』
When I was depressed, I didn't even think that an error would occur when I installed mysql. The error code was 1067 installation and uninstalling several times, but I couldn't, and I turned on some Disabled Services, but it still does not work. Finally, I solved the problem as follows:
Find my. ini in C:/windows and delete it. Then, start winmysqladmin.exe to configure mysql. Save my. ini and start MySQL.
***************
8
MySQL error 1067: Unexpected Process Termination
This problem plagued the morning and was very depressing! I have never encountered MySQL before, but now there is a problem with Zhuang's high version, the problem is the same for the earlier versions I installed (the most important thing is that the operating system is the same ). When MySQL is started in Windows 1067, "error: Unexpected Process Termination" is always displayed "!
I felt the problem was in the configuration file, so I re-wrote my. ini, And the startup was still the same. I searched for failure on Google and crashed! At this point, I was very surprised to see whether your INI file was stored in the Windows directory, copy it to the Windows directory and start the service. OK !!!
I am not satisfied. Why is it different? My other machine is installed with version 4.0.18, which is my. INI is stored in the Windows directory under the user directory, and runs normally. I am a bit confused, and people often seldom think about it after solving the problem, so now I want to give up a little bit. If I don't get the answer now, I think it's basically impossible to think about how to solve it.