MySQL Community 5.7 Server requires the Microsoft Visual C++ 2013 Redistributable Package to run on Windows platforms. Users should make sure the package has been installed on the system before installing the server. The package is available at the Microsoft Download Center
配置my.ini
[mysql]
default-character-set=utf8
[mysqld]
port = 3306
basedir=D:\mysql-5.7.38-winx64
datadir=D:\mysql-5.7.38-winx64\data
max_connections=200
character-set-server=utf8
default-storage-engine=INNODB
innodb_flush_method=normal
在mysql-5.7.19-winx64下新建data文件夹
管理员运行cmd进入mysql bin下执行
mysqld --initialize
mysqld --install
net start mysql
Error Logging on Windows
On Windows, mysqld uses the --log-error, --pid-file, and --console options to determine whether mysqld writes the error log to the console or a file, and, if to a file, the file name:
If --console is given, mysqld writes the error log to the console. (--console takes precedence over --log-error if both are given, and the following items regarding --log-error do not apply. Prior to MySQL 5.7, this is reversed: --log-error takes precedence over --console.)
If --log-error is not given, or is given without naming a file, mysqld writes the error log to a file named host_name.err in the data directory, unless the --pid-file option is specified. In that case, the file name is the PID file base name with a suffix of .err in the data directory.
If --log-error is given to name a file, mysqld writes the error log to that file (with an .err suffix added if the name has no suffix), located under the data directory unless an absolute path name is given to specify a different location.
If the server writes the error log to the console, it sets the log_error system variable to stderr. Otherwise, the server writes the error log to a file and sets log_error to the file name.
找密码,按上面的配置与说法,在data/里
mysql -uroot -p
set password=password('');
exit
3 条评论
常来看看,受益匪浅。
博文值得拜读。受益了!
确实不错,这个要实话实说!