MySQL8 Installation: mysql-8.0.11-winx64

Source: Internet
Author: User

Installation process:

Initialization

    解压安装包之后,在根目录创建文件:my.ini

My.ini

[mysqld]# 设置3306端口port=3306# 设置mysql的安装目录basedir=D:\\2-software\\01-back-end\\mysql-8.0.11-winx64 # 切记此处一定要用双斜杠\\,单斜杠我这里会出错,不过看别人的教程,有的是单斜杠。自己尝试吧# 设置mysql数据库的数据的存放目录datadir=D:\\2-software\\01-back-end\\mysql-8.0.11-winx64\\datadirecto # 切记此处一定要用双斜杠\\,单斜杠我这里会出错,不过看别人的教程,有的是单斜杠。自己尝试吧# 允许最大连接数max_connections=200# 允许连接失败的次数。这是为了防止有人从该主机试图×××数据库系统max_connect_errors=10# 服务端使用的字符集默认为UTF8character-set-server=utf8# 创建新表时将使用的默认存储引擎default-storage-engine=INNODB# 默认使用“mysql_native_password”插件认证default_authentication_plugin=mysql_native_password[mysql]# 设置mysql客户端默认字符集default-character-set=utf8[client]# 设置mysql客户端连接服务端时默认使用的端口port=3306default-character-set=utf8
    把上面的配置拷贝进my.ini,记得修改两处路径。配置环境变量path:    MySQL安装目录下的bin文件夹的路径。    如:D:\2-software\01-back-end\mysql-8.0.11-winx64\bin

Run cmd as Administrator:

进入安装目录下的bin文件夹:cd D:\2-software\01-back-end\mysql-8.0.11-winx64\bin执行初始化:mysqld --initialize --console然后命令行运行时会显示初始账户和密码,记下[email protected]后面的初始密码,后面修改密码时会用到。

Installation:

管理员权限开 shell,进到 bin 目录下:mysqld --install mysql8

Open service:

net start mysql8
Other commands:

Change Password:

mysql -u root -pALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘新密码‘;

Unloading:

net stop mysqlsc delete mysqlmysqld remove mysql重装:mysqld --install mysql8

MySQL8 Installation: mysql-8.0.11-winx64

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.