1、配置环境变量 2、从开源网站下载镜像文件如(网易、清华大学开源镜像网站) 新建data文件夹,新建my.ini配置文件
3、在数据库配置文件中添加以下内容
[mysqld]
bind-address=0.0.0.0
max_allowed_packet=64M
innodb_buffer_pool_size=1024M
transaction-isolation=read-committed
default-time-zone='+8:00'
default-authentication-plugin=mysql_native_password
port = 3306
basedir=E:\mysql-5.7.36-winx64
datadir=E:\mysql-5.7.36-winx64\data
max_connections=600
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysql]
default-character-set=utf8
4、如果服务器原来有数据库服务需要删除,如果没有直接在dos窗口中直接安装,注意一定要以管理员身份运行,否则会带来不必要得麻烦
sc delete mysql
mysqld -install
mysqld --initialize
5、在配置文件中将启用skip-grant-tables 然后重启数据库 net stop mysql net start mysql 5、键入命令行alter user user() identified by “xxxxxx”;我的密码是123456,因此我入 alter user user() identified by “123456”; 6、设置远程连接 use mysql; select host from user where user=‘root’; update user set host=’%’ where user=‘root’ flush privileges;
|