首页 > 数据库 > MySQL > 正文

mysql5.7单实例命令行安装 windows环境下

2024-07-24 12:34:48
字体:
来源:转载
供稿:网友
          mysql5.7单实例命令行安装:

  一.下载安装包
 
  二.解压缩至安装目录
  D:/install_path
 
  三.添加path环境变量
  path=xxx;D:/install_path/bin
 
  四.建立参数文件
  D:/install_path/bin/my.ini
  点击(此处)折叠或打开
 
  [client]
  port=3306
  [mysqld]
  port=3306
  basedir=D://mysql
  datadir=D://mysql//data
  character-set-server=utf8
  max_connections=200
  default-storage-engine=INNODB
  [mysql]
  default-character-set=utf8
 
  五.安装
  mysqld -install mysql --defaults-file=D:/mysql/bin/my.ini(参数文件路径)
 
  删除命令:sc delete mysql
 
  六.初始化mysql
  mysqld --initialize-insecure
 
  七.启动服务
  D:/mysql/bin>net start mysql
  The mysql service is starting.
  The mysql service was started successfully.
 
  八.登录并设定密码
  mysql -uroot
  mysql> set password=password('root');
  Query OK, 0 rows affected, 1 warning (0.00 sec)
  mysql> flush privileges;
  Query OK, 0 rows affected (0.00 sec)

(编辑:武林网)

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表