MySQL版本 - 5.7.11
即使以管理员身份运行命令提示符并且在mysql和mysqld的exe文件中标记为管理员,我也无法在Windows 10上运行mysql服务器。
以下是数据目录中存在的日志文件的内容 -
2016-02-28T18:44:37.478791Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-02-28T18:44:37.479292Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2016-02-28T18:44:37.480293Z 0 [Note] mysqld (mysqld 5.7.11) starting as process 504 ...
2016-02-28T18:44:37.643005Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-02-28T18:44:37.644506Z 0 [Note] InnoDB: Uses event mutexes
2016-02-28T18:44:37.645507Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2016-02-28T18:44:37.646508Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-02-28T18:44:37.651010Z 0 [Note] InnoDB: Number of pools: 1
2016-02-28T18:44:37.655562Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2016-02-28T18:44:37.716605Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-02-28T18:44:37.736603Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-02-28T18:44:37.757664Z 0 [Note] InnoDB: The first innodb_system data file 'ibdata1' did not exist. A new tablespace will be created!
2016-02-28T18:44:37.760134Z 0 [Note] InnoDB: Setting file '.\ibdata1' size to 12 MB. Physically writing the file full; Please wait ...
2016-02-28T18:44:37.956704Z 0 [Note] InnoDB: File '.\ibdata1' size is now 12 MB.
2016-02-28T18:44:38.047061Z 0 [Note] InnoDB: Setting log file .\ib_logfile101 size to 48 MB
2016-02-28T18:44:38.500757Z 0 [Note] InnoDB: Setting log file .\ib_logfile1 size to 48 MB
2016-02-28T18:44:39.211654Z 0 [Note] InnoDB: Renaming log file .\ib_logfile101 to .\ib_logfile0
2016-02-28T18:44:39.226714Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-02-28T18:44:39.226714Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2016-02-28T18:44:39.226714Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-02-28T18:44:39.423633Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
2016-02-28T18:44:39.477796Z 0 [Note] InnoDB: Doublewrite buffer not found: creating new
2016-02-28T18:44:39.657048Z 0 [Note] InnoDB: Doublewrite buffer created
2016-02-28T18:44:39.703088Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-02-28T18:44:39.704591Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2016-02-28T18:44:39.731614Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-02-28T18:44:39.975606Z 0 [Note] InnoDB: Foreign key constraint system tables created
2016-02-28T18:44:39.977607Z 0 [Note] InnoDB: Creating tablespace and datafile system tables.
2016-02-28T18:44:40.036710Z 0 [Note] InnoDB: Tablespace and datafile system tables created.
2016-02-28T18:44:40.036710Z 0 [Note] InnoDB: Creating sys_virtual system tables.
2016-02-28T18:44:40.132743Z 0 [Note] InnoDB: sys_virtual table created
2016-02-28T18:44:40.134252Z 0 [Note] InnoDB: Waiting for purge to start
2016-02-28T18:44:40.185456Z 0 [Note] InnoDB: Waiting for purge to start
2016-02-28T18:44:40.236970Z 0 [Note] InnoDB: Waiting for purge to start
2016-02-28T18:44:40.292644Z 0 [Note] InnoDB: 5.7.11 started; log sequence number 0
2016-02-28T18:44:40.421142Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Table 'mysql.plugin' doesn't exist
2016-02-28T18:44:40.642217Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2016-02-28T18:44:41.016703Z 0 [Note] Salting uuid generator variables, current_pid: 504, server_start_time: 1456685077, bytes_sent: 0,
2016-02-28T18:44:41.056673Z 0 [Note] Generated uuid: '539246ef-de4b-11e5-a535-b8ac6f65e9fe', server_start_time: 1456685581, bytes_sent: 3022329767296
2016-02-28T18:44:41.106807Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 539246ef-de4b-11e5-a535-b8ac6f65e9fe.
2016-02-28T18:44:41.496798Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2016-02-28T18:44:41.644892Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2016-02-28T18:44:41.697459Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2016-02-28T18:44:41.698960Z 0 [Note] IPv6 is available.
2016-02-28T18:44:41.698960Z 0 [Note] - '::' resolves to '::';
2016-02-28T18:44:41.699962Z 0 [Note] Server socket created on IP: '::'.
2016-02-28T18:44:41.703464Z 0 [Warning] Failed to open optimizer cost constant tables
2016-02-28T18:44:45.751401Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2016-02-28T18:44:45.787570Z 0 [ERROR] Aborting
2016-02-28T18:44:45.788067Z 0 [Note] Binlog end
2016-02-28T18:44:45.828191Z 0 [Note] Shutting down plugin 'ngram'
2016-02-28T18:44:45.828675Z 0 [Note] Shutting down plugin 'partition'
2016-02-28T18:44:45.829175Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2016-02-28T18:44:45.829676Z 0 [Note] Shutting down plugin 'ARCHIVE'
2016-02-28T18:44:45.830175Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2016-02-28T18:44:46.031497Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2016-02-28T18:44:46.031969Z 0 [Note] Shutting down plugin 'MyISAM'
2016-02-28T18:44:46.598005Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2016-02-28T18:44:46.598485Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2016-02-28T18:44:46.598988Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2016-02-28T18:44:46.599486Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2016-02-28T18:44:46.600036Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2016-02-28T18:44:46.600486Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2016-02-28T18:44:46.600986Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2016-02-28T18:44:46.601486Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2016-02-28T18:44:46.601988Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2016-02-28T18:44:46.602487Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2016-02-28T18:44:46.602487Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2016-02-28T18:44:46.602988Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2016-02-28T18:44:46.603489Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2016-02-28T18:44:46.603989Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2016-02-28T18:44:46.604490Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2016-02-28T18:44:46.604990Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2016-02-28T18:44:46.605490Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2016-02-28T18:44:46.605490Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2016-02-28T18:44:46.605990Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2016-02-28T18:44:46.606491Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2016-02-28T18:44:46.606991Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2016-02-28T18:44:46.607492Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2016-02-28T18:44:46.607992Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2016-02-28T18:44:46.608493Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2016-02-28T18:44:46.608493Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2016-02-28T18:44:46.608993Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2016-02-28T18:44:46.609535Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2016-02-28T18:44:46.610023Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2016-02-28T18:44:46.610511Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2016-02-28T18:44:46.610511Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2016-02-28T18:44:46.611026Z 0 [Note] Shutting down plugin 'InnoDB'
2016-02-28T18:44:46.611524Z 0 [Note] InnoDB: FTS optimize thread exiting.
2016-02-28T18:44:46.611996Z 0 [Note] InnoDB: Starting shutdown...
2016-02-28T18:44:46.721456Z 0 [Note] InnoDB: Dumping buffer pool(s) to D:\mysql\data\ib_buffer_pool
2016-02-28T18:44:46.729458Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 160229 0:14:46
2016-02-28T18:44:48.212545Z 0 [Note] InnoDB: Shutdown completed; log sequence number 1209970
2016-02-28T18:44:48.213546Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2016-02-28T18:44:48.214047Z 0 [Note] Shutting down plugin 'MEMORY'
2016-02-28T18:44:48.214047Z 0 [Note] Shutting down plugin 'CSV'
2016-02-28T18:44:48.214547Z 0 [Note] Shutting down plugin 'sha256_password'
2016-02-28T18:44:48.214547Z 0 [Note] Shutting down plugin 'mysql_native_password'
2016-02-28T18:44:48.215047Z 0 [Note] Shutting down plugin 'keyring_file'
2016-02-28T18:44:48.259518Z 0 [Note] Shutting down plugin 'binlog'
2016-02-28T18:44:48.260518Z 0 [Note] mysqld: Shutdown complete
答案 0 :(得分:0)
至少有一个必需的表不存在,如您所呈现的日志文件中所示:“表'mysql.user'不存在。”如果您还没有“运行mysql_upgrade来创建它”,那么Perhaps manually initialize the data directory
答案 1 :(得分:0)
你应该在服务器启动之前运行“mysqld --initialize”。
https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html