解决方案 »

  1.   

    it appears to be a very common error message on Windows. It's so common that MySQL group provides the troubleshooting approach for 1067 on their website:
    If the MySQL server cannot find the mysql privileges database or other critical files, it displays these messages: 
    System error 1067 has occurred.
    Fatal error: Can't open and lock privilege tables:
    Table 'mysql.user' doesn't exist
    These messages often occur when the MySQL base or data directories are installed in different locations than the default locations (C:\Program Files\MySQL\MySQL Server 5.7 and C:\Program Files\MySQL\MySQL Server 5.7\data, respectively). This situation can occur when MySQL is upgraded and installed to a new location, but the configuration file is not updated to reflect the new location. In addition, old and new configuration files might conflict. Be sure to delete or rename any old configuration files when upgrading MySQL. If you have installed MySQL to a directory other than C:\Program Files\MySQL\MySQL Server 5.7, ensure that the MySQL server is aware of this through the use of a configuration (my.ini) file. Put the my.ini file in your Windows directory, typically C:\WINDOWS. To determine its exact location from the value of the WINDIR environment variable, issue the following command from the command prompt: 
    C:\> echo %WINDIR%
    You can create or modify an option file with any text editor, such as Notepad. For example, if MySQL is installed in E:\mysql and the data directory is D:\MySQLdata, you can create the option file and set up a [mysqld] section to specify values for the basedir and datadir options: 
    [mysqld]
    # set basedir to your installation path
    basedir=E:/mysql
    # set datadir to the location of your data directory
    datadir=D:/MySQLdata
    Note that Windows path names are specified in option files using (forward) slashes rather than backslashes. If you do use backslashes, double them: 
    [mysqld]
    # set basedir to your installation path
    basedir=C:\\Program Files\\MySQL\\MySQL Server 5.7
    # set datadir to the location of your data directory
    datadir=D:\\MySQLdata
    The rules for use of backslash in option file values are given in Section 4.2.6, “Using Option Files”. If you change the datadir value in your MySQL configuration file, you must move the contents of the existing MySQL data directory before restarting the MySQL server. http://dev.mysql.com/doc/refman/5.7/en/windows-troubleshooting.html
    My suggestion is: although Oracle put a lot efforts on MySQL for Windows, it still performs better on a Linux box... If this is for development and testing, it is fine. Just don't set up your MySQL production environment against Windows.