安装mysql步骤

安装mysql步骤
1、将my-default.ini文件名改为my.ini
并且添加:
[mysql]  #与客户端配置相关
default-character-set=utf8 
[mysqld]  #与服务器配置相关
basedir = D:/mysql-5.7.15-winx64      #mysql所在目录
datadir = D:/mysql-5.7.15-winx64/data #mysql数据所在目录,据说一定要是data
port = 3306                          
   character_set_server=utf8
2、执行以下命令

 

D:\mysql-5.7.15-winx64\bin>mysqld install
D:\mysql-5.7.15-winx64\bin>mysqld --initialize
D:\mysql-5.7.15-winx64\bin>net start mysql
D:\mysql-5.7.15-winx64\bin>mysql -u root -p(密码在.err文件中查localhost)
mysql> set password = password('123qwe');
mysql> grant all privileges on *.* to root@"%" identified by ".";[GRANT ALL PRIVILEGES ON 数据库名.* TO root@'%'  IDENTIFIED BY '密码' WITH GRANT OPTION;]
mysql> flush privileges;
posted @ 2018-05-16 18:40  筱小Q  阅读(97)  评论(0编辑  收藏  举报