Mysql boot prompt mysql.host does not exist, start a failed workaround _mysql

Source: Internet
Author: User
Tags mysql download mysql in rar firewall
Records in error log:

[ERROR] Fatal Error:can ' t open and Lock Privilege tables:table ' mysql.host ' doesn ' t exist

From the post, only people look, no one replied, see this situation can only solve their own problems, their hands and clothing, well ... You still don't say, really let me solve the problem, people ah, are forced out of the,.... There is no way, the problem for the master may be very simple questions, but for the first time I touch MySQL, really how also do not understand the problem.
All right, let's talk a little bit about the process I'm dealing with:

Follow the MySQL installation steps:
shell> Groupadd MySQL
shell> useradd-g MySQL MySQL
Shell> Gunzip < mysql-version.tar.gz | TAR-XVF-
Shell> CD Mysql-version
shell>./configure--prefix=/usr/local/mysql
Shell> make
shell> make Install
Shell> scripts/mysql_install_db--user=mysql
Shell> Chown-r Root/usr/local/mysql
Shell> Chown-r Mysql/usr/local/mysql/var
Shell> Chgrp-r Mysql/usr/local/mysql
shell> CP support-files/my-medium.cnf/etc/my.cnf
Shell>/usr/local/mysql/bin/mysqld_safe--user=mysql &

There is no problem with this standard, but when I start MySQL in the final step I want to put the data files of the database under another directory, and the start command is modified to:
Shell>/usr/local/mysql/bin/mysqld_safe--user=mysql--log-error=/u01/mysql/mysql_error/error--datadir=/u01/ Mysql/data

There is a problem at this time, because the default created permission table is below the default directory/usr/local/mysql/var when you initialize the Database permission table, which causes the above error to not find the permission table: Can ' t open and lock Privilege tables:table ' mysql.host ' doesn ' t exist

Workaround use the Add parameter--datadir when running the initialization permission table, the command format is:
shell> scripts/mysql_install_db--user=mysql--datadir=/u01/mysql/data
That will solve the problem.
This problem will also occur when you modify your database data file to another directory, because you do not create a database permission table in the appropriate directory, the solution is you rerun the mysql_install_db file, regenerate the database permissions table, but the corresponding you have to rebuild the user , as well as setting permissions; the second option should be to copy the file of the old permission table to the corresponding directory of the database table, but the second method I have not used is to guess according to my own imagination. If you have a master, please confirm that it is correct.

MySQL prompts service to start failed solution

This problem has always been encountered before, but it is handled in the following ways,

Uninstall MySQL in the Add-remove program first, then the original MySQL directory renamed, and then open the registry with F3 cycle to find "MySQL", all deleted, and finally restart the machine and then reinstall MySQL can be done, but today, the problems encountered than special, according to the above and the following methods have tried the still not, Install to the last to boot there will fail, all the running services and software are turned off, and the continuous restart of the N times are to stop there, and then simply change a high version of the test, this time after all the removal of the reload to the last step is still waiting for a long time, and finally succeeded, now recorded, You will not be depressed again when you encounter such problems again!

Reload is successful, but after the restart test found that there is a problem, the service can not start, has been the following error:
The MySQL service cannot be started on the local computer.
Error 1053: The service did not respond to a start or control request in a timely manner.

And studied for a long time, finally finished, found that his original computer administrator username has a $ character, thought it would not be his business, built a normal independent computer account Mysqluser, Then in the process of the end of the Mysqld.exe, and then in the directory of MySQL, right-click the property security, add Mysqluser this user and give Full Control permissions, and then open the Service Manager in the MySQL service point right, input just set up the account and password to determine, the following figure!

Finally restart the service at will, restart the computer again, still very smooth, so this difficult problem is completely resolved, the problem is the root of the system administrator account of the $ characters, hehe.

With a few common MySQL download addresses and MySQL management tools!

Http://sys.7i24.com/soft/mysql5132.rar
Http://sys.7i24.com/soft/mysql5158.rar
Http://mysql.he.net/Downloads/MySQL-5.5/mysql-5.5.21-win32.msi

MySQL 5.5.12 Official edition (for Windows 64-bit)
thunder://qufodhrwoi8veglhemfplnhpyxphawjhlmnvbs9tb2z0l00vtxltuuxfns41ljeyx3dpbng2nf9yawfaywlcys56axbawg==

Navicat for MySQL V9.0.15 Green Chinese Version _ Excellent database management and development tools
thunder://qufodhrwoi8vd3d3dy4xmtkuegrvd25zlmnvbs91cgxvywrgawxllziwmtatmtavbmf2awnhdf9mb3jftxltuuwucmfywlo=


================ The following are the general approaches to dealing with such problems ========================
When MySQL is installed to the last step, the start service is a failed state what is the reason

Use Services.msc to open the service window to see if the MySQL service exists. If it already exists and is started, stop the service and then delete the response in the brochure ("HKEY_LOCAL_MACHINE\System \currentcontrolset\services") and use the command SC to remove MySQL. And then continue to install, you can succeed.
MySQL installation appears could not start the service MySQL error:0 processing
You can try the following two ways when you are installing, reloading, could not start the service MySQL error:0 error.
One, Mode 1
MySQL installation is appearing could not start the service MySQL error:0 Prompt for error, workaround:
First, stop the MySQL service in the admin tool-> Service, and then open cmd into your MySQL bin directory, such as C:\Program files\mysql\mysql Server 5.0\bin Then use the following command Mysqld-nt-remove and then show ... success! Okay, let's go to the Add removal program, find the MySQL option Uninstall, and remember to select Remove. Finally, the MySQL directory is deleted, and the directory of the database is also deleted.
One, Mode 2
Check that there is no MySQL in the service, if there is to stop the service;
Installing MySQL 5.1.33 the third start service in the Execute configurattion step of the Run Server Instance Configuration Wizard error, error prompted by could not Start the service MySQL (this situation is generally due to the installation of MySQL, uninstall is not clean caused.) Reboot and reload after unloading. Note that if the service is not uninstalled, you can uninstall it with Mysqld-nt-remove.
Run the Add Remove Program in Control Panel, uninstall MySQL;
After uninstall, open the registry, view the key values under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, if there is a relevant MySQL key value (MySQL, mysqladmin) is deleted, you can;
Restart, the MySQL installation of the residual directory deleted (view services, at this time there is no MySQL service);
Reinstall MySQL. Do not run the Server Instance Configuration Wizard after the installation, and then run the wizard in the Start menu after the reboot.
Windows XP System mysql-5.0.81
Tip: 1045 Access denied for user ' root ' @ ' localhost ' using password Yes
MySQL 5.1 installation process report to apply security Setting error solution Collection
MySQL installation error apply security settings solution
The security settings could is applied to the database because the connection has and the failed error.
Error Nr. 1045
Access denied for user ' root ' @ ' localhost ' (using Password:yes)
If A personal firewall is running in your machine, please make sure to have the TCP port opened for 3306. Otherwise no client application can connect to the server. After your have opened the port please press [retry] to apply the security settings.
If you are are re-installing after you just uninstalled the MySQL server please note that the data directory is not removed a Utomatically. Therefore the old password from your installation is still needed to connect to the server. In this case, select Skip now and re-run the Configuration Wizard from the Start menu.
MySQL 5.1 Installation Process report apply security Setting error solution
1, uninstall MySQL
2, delete directory C:\Documents and Settings\All Users\Application Data\mysql
3, reinstall MySQL OK
------------------------------------------
[MySQL] Could not start the service MySQL solution
Installing MySQL 5.1.33 the third start service in the Execute configurattion step of the Run Server Instance Configuration Wizard error, error prompted by could not Start the service MySQL (this situation is generally due to the installation of MySQL, uninstall is not clean caused.) Reboot and reload after unloading. Note that if the service is not uninstalled, you can uninstall it with Mysqld-nt-remove.
The specific methods are as follows:
Check that there is no MySQL in the service, if there is to stop the service;
Run the Add Remove Program in Control Panel, uninstall MySQL;
After uninstall, open the registry, view the key values under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, if there is a relevant MySQL key value (MySQL, mysqladmin) is deleted, you can;
Restart, the MySQL installation of the residual directory deleted (view services, at this time there is no MySQL service);
Reinstall MySQL. Do not run the Server Instance Configuration Wizard after the installation, and then run the wizard in the Start menu after the reboot.
PS: A method worthy of reference
---------------------------------------------
MSYQL install to the last step start service error resolution
1, to the control Panel to remove MySQL first.
2. To c disk C:\Program files directory to delete the MySQL directory.
3. If there is a set directory on the other disk also want to delete. Empty directory also to delete
4. To regedit the registration form
Copy Code code as follows:

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 anything, delete all!
(Tip: Use the F3 loop to find "MySQL")
5. If the MySQL content in Task Manager is also deleted
6, turn the firewall off.
7, reinstall MySQL (I did not restart the computer here)
Restart the computer, deactivate IIS, and delete temporary files in temp if necessary when reloading.
When you configure MySQL, replace the MySQL service with a service name.
******************************************************************************************
---------------------------
An error occurred while deleting the item.
---------------------------
Unable to delete legacy_mysql51: An error occurred while deleting the item.
---------------------------
Are you sure
---------------------------
Workaround: Right-click in registry key to increase administrators all permissions
Installing MySQL may produce cannot create Windows service for mysql.error:0 errors, most of the reason for the error is due to reinstalling MySQL or upgrading to MYDQL, using MySQL Configuration Wizard.
Solution: To regedit the registry, with F3 cycle to find "MySQL", all deleted, reinstall MySQL, you can.

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.