MySQL 绿色版安装Window 系统
2017-10-23 19:05
246 查看
为了便捷安装现在网上提供了许多的绿色版本MySQL安装包,下载后解压即可使用,但是MySQL 下载直接运行还是有一点小问题,需要把MYSQL 注册成为系统服务;
1.下载mysql绿色版本 例如:mysql-5.7.20-winx64;
2.修改数据库配置文件,j将my-default.in文件复制并命名为:my.ini;
3.执行mysqld –install mysqld --defaults-file="D:\Program Files\mysql\my.ini",注册服务名,在windows服务中注册mysqld服务;
4.创建mysql的数据目录,执行 mysqld --initialize 创建数据库初始化文件;
5.执行net start mysql启动服务,net stop mysql关闭服务;
6.初次登录时,我们无法获取到数据库的root密码,所以需要my.ini文件中添加skip-grant-tables跳过权限验证。
7.将MYSQL配置系统环境变量,便于我们以后的操作;
8.执行mysql 命令,直接进入mysql系统;
8.登录成功,设置root初始化密码:
9.将my.ini中的skip-grant-tables去掉,重启服务。
10.命令行中链接数据库,修改数据库密码;
此时我们已经将绿色版本的MYSQL安装完成了,相比安装还是简单了许多,如果不熟悉配置文件,还是手动的一步一步的安装会更加靠谱。
1.下载mysql绿色版本 例如:mysql-5.7.20-winx64;
2.修改数据库配置文件,j将my-default.in文件复制并命名为:my.ini;
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** 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. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = ..... #设置基目录 # datadir = ..... #设置数据目录 # port = ..... #设置MYSQL端口 # server_id = ..... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
3.执行mysqld –install mysqld --defaults-file="D:\Program Files\mysql\my.ini",注册服务名,在windows服务中注册mysqld服务;
4.创建mysql的数据目录,执行 mysqld --initialize 创建数据库初始化文件;
5.执行net start mysql启动服务,net stop mysql关闭服务;
6.初次登录时,我们无法获取到数据库的root密码,所以需要my.ini文件中添加skip-grant-tables跳过权限验证。
7.将MYSQL配置系统环境变量,便于我们以后的操作;
8.执行mysql 命令,直接进入mysql系统;
8.登录成功,设置root初始化密码:
use mysql; update user set password=password('123456') where user='root';
9.将my.ini中的skip-grant-tables去掉,重启服务。
10.命令行中链接数据库,修改数据库密码;
mysql -uroot -p set password=password('123456'); -- 设置root密码
此时我们已经将绿色版本的MYSQL安装完成了,相比安装还是简单了许多,如果不熟悉配置文件,还是手动的一步一步的安装会更加靠谱。
相关文章推荐
- MySQL 绿色版安装Window 系统
- 64位 win10系统安装绿色版mysql-5.7.16-winx64的教程
- Win 8 系统下 MySQL 5.6绿色版下载配置与使用——Windows J2EE开发安装序列之四
- windows2008 64位系统下MySQL 5.7绿色版的安装教程
- window上mysql绿色版安装
- MySQL 忘记root密码 重新安装 干净卸载 清除原root密码方法 (Window系统)
- MySQL 忘记root密码 重新安装 干净卸载 清除原root密码方法 (Window系统)
- Windows server 2008 R2 服务器安装 MySql 5.6.36 64位绿色版 报系统错误1067
- window系统安装mysql服务
- 64位 win10系统安装绿色版mysql-5.7.16-winx64的教程
- window 安装Mysql 5.6 发生系统错误 1067
- Win 8或以上系统下的 MySQL最新版5.7.17(64bit ZIP绿色版)安装部署教程
- MySQL安装【图文详解】(window 7系统环境)
- Win 8或以上系统下MySQL最新版5.7.17(64bit ZIP绿色版)安装部署教程
- Windows系统安装绿色版Mysql 5.6数据库
- window下安装mysql绿色版
- Windows 64位操作系统安装mysql 绿色版 mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- 最小化CentOS系统下源码编译安装MySQL
- centOS系统安装MySQL教程
- mac系统上删除已经安装的mysql全部文件