


Solution to the problem of unsuccessful installation and startup of Mysql5.7.17 under Windows
这篇文章主要介绍了解决Mysql5.7.17在windows下安装启动时提示不成功问题,需要的朋友可以参考下
在机器上首次安装MySQL,
操作系统是win7
mysql 的安装文件是 zip 格式的,版本是5.7.17
解压之后,安装步骤是
1、首先找个文件存放这些安装程序以及 数据
假设是E:\\mysql
2、把解压的文件放在E:\\mysql下,并且新建个data文件夹
3、创建环境变量mysql 路径是E:\\mysql
添加到path 中 %MYSQL%\bin;
4、在解压的文件夹下有个my-default.ini
的文件,首先拷贝一份,重命名为my.ini
修改文件内容
只修改两行就行
basedir = E:\\mysql datadir = E:\\mysql\\data
这两行原先是用#号注释掉的,
5、用系统管理员身份启动命令行
输入mysqld -install
这个是安装mysql 服务的
6、输入 mysqld --initialize
这个是因为 自动5.7.7版本之后,windows安装mysql通过zip解压的方式,不再包含data 文件夹,
如果没有data文件夹,则会在启动mysql服务的时候起不来,观察data文件夹下后缀名是.err的文件就可以发现,会报这么一些错误
MySQL: Table 'mysql.plugin' doesn't exist 2017-01-01T17:13:33.200113Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 2017-01-01T17:13:33.202113Z 0 [Note] Salting uuid generator variables, current_pid: 6908, server_start_time: 1483290810, bytes_sent: 0, 2017-01-01T17:13:33.237115Z 0 [Note] Generated uuid: '9fb87162-d045-11e6-b092-00ff173a9c42', server_start_time: 1483297718, bytes_sent: 114009376 2017-01-01T17:13:33.241115Z 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: 9fb87162-d045-11e6-b092-00ff173a9c42. 2017-01-01T17:13:33.248116Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2017-01-01T17:13:33.250116Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key 2017-01-01T17:13:33.254116Z 0 [Note] Server hostname (bind-address): '*'; port: 3306 2017-01-01T17:13:33.259116Z 0 [Note] IPv6 is available. 2017-01-01T17:13:33.260117Z 0 [Note] - '::' resolves to '::'; 2017-01-01T17:13:33.261117Z 0 [Note] Server socket created on IP: '::'. 2017-01-01T17:13:33.266117Z 0 [Warning] Failed to open optimizer cost constant tables 2017-01-01T17:13:33.268117Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 2017-01-01T17:13:33.270117Z 0 [ERROR] Aborting
其实这是因为这些表示放在data文件夹下的,所以我们需要先执行命令mysqld -initialize
在完成mysql 的初始化,这样的话,mysql会自动完成一些初始化的工作
7、启动服务 net start mysql
The above is the detailed content of Solution to the problem of unsuccessful installation and startup of Mysql5.7.17 under Windows. For more information, please follow other related articles on the PHP Chinese website!

The steps for upgrading MySQL database include: 1. Backup the database, 2. Stop the current MySQL service, 3. Install the new version of MySQL, 4. Start the new version of MySQL service, 5. Recover the database. Compatibility issues are required during the upgrade process, and advanced tools such as PerconaToolkit can be used for testing and optimization.

MySQL backup policies include logical backup, physical backup, incremental backup, replication-based backup, and cloud backup. 1. Logical backup uses mysqldump to export database structure and data, which is suitable for small databases and version migrations. 2. Physical backups are fast and comprehensive by copying data files, but require database consistency. 3. Incremental backup uses binary logging to record changes, which is suitable for large databases. 4. Replication-based backup reduces the impact on the production system by backing up from the server. 5. Cloud backups such as AmazonRDS provide automation solutions, but costs and control need to be considered. When selecting a policy, database size, downtime tolerance, recovery time, and recovery point goals should be considered.

MySQLclusteringenhancesdatabaserobustnessandscalabilitybydistributingdataacrossmultiplenodes.ItusestheNDBenginefordatareplicationandfaulttolerance,ensuringhighavailability.Setupinvolvesconfiguringmanagement,data,andSQLnodes,withcarefulmonitoringandpe

Optimizing database schema design in MySQL can improve performance through the following steps: 1. Index optimization: Create indexes on common query columns, balancing the overhead of query and inserting updates. 2. Table structure optimization: Reduce data redundancy through normalization or anti-normalization and improve access efficiency. 3. Data type selection: Use appropriate data types, such as INT instead of VARCHAR, to reduce storage space. 4. Partitioning and sub-table: For large data volumes, use partitioning and sub-table to disperse data to improve query and maintenance efficiency.

TooptimizeMySQLperformance,followthesesteps:1)Implementproperindexingtospeedupqueries,2)UseEXPLAINtoanalyzeandoptimizequeryperformance,3)Adjustserverconfigurationsettingslikeinnodb_buffer_pool_sizeandmax_connections,4)Usepartitioningforlargetablestoi

MySQL functions can be used for data processing and calculation. 1. Basic usage includes string processing, date calculation and mathematical operations. 2. Advanced usage involves combining multiple functions to implement complex operations. 3. Performance optimization requires avoiding the use of functions in the WHERE clause and using GROUPBY and temporary tables.

Efficient methods for batch inserting data in MySQL include: 1. Using INSERTINTO...VALUES syntax, 2. Using LOADDATAINFILE command, 3. Using transaction processing, 4. Adjust batch size, 5. Disable indexing, 6. Using INSERTIGNORE or INSERT...ONDUPLICATEKEYUPDATE, these methods can significantly improve database operation efficiency.

In MySQL, add fields using ALTERTABLEtable_nameADDCOLUMNnew_columnVARCHAR(255)AFTERexisting_column, delete fields using ALTERTABLEtable_nameDROPCOLUMNcolumn_to_drop. When adding fields, you need to specify a location to optimize query performance and data structure; before deleting fields, you need to confirm that the operation is irreversible; modifying table structure using online DDL, backup data, test environment, and low-load time periods is performance optimization and best practice.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.
