云服务器Window Server 2012R系统安装MySQL
来源:互联网 发布:网络协议实验报告 编辑:程序博客网 时间:2024/06/18 10:19
本人用阿里云的云服务器搭建一个网站练习,不知道在Window Server 2012R2系统下如何搭建MySQL,经过度娘终于解决,所以再次记入步骤以防下次搭建忘记。
1、在MySQL官网下载软件压缩包
2、解压完后,放到相应的硬盘中,我放的位置是E盘。然后将解压后文件夹中的my-default.ini这个配置文件复制一份并将其命名为my.ini。然后将里面的内容修改为如下
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[client]
default-character-set=utf8
port=3306
[mysqld]
port=3306
character_set_server=utf8
basedir ="E:\MySQL\mysql-5.7.17-winx64"
datadir ="E:\MySQL\mysql-5.7.17-winx64/data/"
tmpdir ="E:\MySQL\mysql-5.7.17-winx64/data/"
socket ="E:\MySQL\mysql-5.7.17-winx64/data/mysql.sock"
log-error="E:\MySQL\mysql-5.7.17-winx64/data/mysql_error.log"
character_set_server=utf8
#server_id = 2
#skip-locking
max_connections=100
table_open_cache=256
query_cache_size=1M
tmp_table_size=32M
thread_cache_size=8
innodb_data_home_dir="E:\MySQL\mysql-5.7.17-winx64\data"
innodb_flush_log_at_trx_commit =1
innodb_log_buffer_size=128M
innodb_buffer_pool_size=128M
innodb_log_file_size=10M
innodb_thread_concurrency=16
innodb-autoextend-increment=1000
join_buffer_size = 128M
sort_buffer_size = 32M
read_rnd_buffer_size = 32M
max_allowed_packet = 32M
explicit_defaults_for_timestamp=true
#sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
3、在dos下进入MySQL的bin文件夹中进行相关命令
分别输入以下3条命令:
mysqld -console
mysqld --initialize
mysqld install
配置成功后mysql根目录下会生成一个data文件夹。
4、修改密码
1. 到my.ini中, 在[mysqld]下添加一行skip-grant-tables(忽略授权表),再忘记root密码的时候,这是个很有用的参数.
2. 启动MySQL, 在DOS中输入 mysql -uroot -pu就是user,p自然就是password,记得u和p与后面的用户名密码间不要有空格.这里回车后,会让你输入一个密码,随便输入一个你的密码就可以.
3. mysql> update mysql.user set authentication_string=password('12345') where user='root' and Host = 'localhost';括号中是自己的密码.记得结尾有个分号.
4. mysql> flush privileges;
5. mysql> quit;
6. 回到配置文件中,删除skip-grant-tables这一行,保存重启mysql即可.
7. 之后修改密码,使用mysql>SET PASSWORD = PASSWORD('123456');
配置完成后就可以通过DOS进入Mysql。
- 云服务器Window Server 2012R系统安装MySQL
- window下安装mysql服务器
- window系统安装mysql服务
- MySQL 绿色版安装Window 系统
- Intel I218 V、Intel I219 V等网卡不能安装window server服务器系统驱动解决方法
- 腾讯云Centos7系统mysql server安装
- window xp系统、apache服务器安装openssl
- Window Server 2012 -安装备忘
- Window Server 2012的安装
- window系统安装mysql数据库解压缩版
- Windows server 2008 R2 服务器安装 MySql 5.6.36 64位绿色版 报系统错误1067
- 远程连接mysql数据库,服务器为window系统
- window系统下备份远程服务器mysql数据库
- 安装ubuntu-server版服务器系统
- Ubuntu/Linux Server 服务器系统安装
- aliyunESC服务器安装mysql server and client
- Windows Server 2012 搭建PHP+MySQL环境安装DedeCMS系统
- 腾讯云服务器CentOS7系统上安装JDK+Tomcat+MySQL
- 滴,学生卡||终于自学完了C++
- [LeetCode]235. Lowest Common Ancestor of a Binary Search Tree
- mysql批量修改字符集
- 计算几何题目集锦
- 开篇--2017年计划
- 云服务器Window Server 2012R系统安装MySQL
- 38-1-2
- ssm整合中出现illegalargumentexception、NosuchbeansException解决
- PLSQL Trigger :OLD :NEW
- 6.4响应首部字段
- 博弈题目集锦
- 2.7.2 HTML5背景
- jQuery中的DOM操作(二)
- Leetcode 93. Restore IP Addresses