windows installed under mysql5.6

The main purpose is to download and install django2.1 5.5 does not support the database, you must upgrade to 5.6 or more before you can use! ! ! ! ! ! ! ! ! ! ! ! !

Installing MySQL on Windows, there are two ways, one is to download the installation package, all the way to next install the prompts, does not require any configuration, it is relatively simple; the other is to download the compressed package to install and configure the command 

The first installation:

Mysql windows system installation package Download: https://dev.mysql.com/downloads/installer/

Wait to download and install:

Successful installation! ! ! ! ! !

Reference here: https://www.cnblogs.com/spdb/p/10437491.html

 

The following is the second installation:

The first step to enter the official website to download: https://www.mysql.com/

Click Download to download, after download is complete we install.

Right-click on My Computer -> Properties -> Advanced -> Environment Variables, select PATH variable in the system, F: \ MyDevelepeTools \ mysql-5.6.46-winx64 \ bin

Next: find the open data catalog

Modify the configuration file, my-default.ini copy mysql directory, rename my.ini, open my.ini, modify or add configuration, and then save

basedir = F: \ MyDevelepeTools \ mysql-5.6.46-winx64 (mysql directory)

datadir = F: \ MyDevelepeTools \ mysql-5.6.46-winx64 \ data (mysql directory \ Data)

Input mysqld --initialize-insecure --user = mysql Enter

Enter mysqld install Enter

Mysql installed on this success! ! ! ! ! ! ! ! ! !

Enter net start mysql Enter to start the mysql service, start to start, stop stop

Local connection MySQL Command Line

输入 mysql -u root -p ,回车,出现 Enter passwore: ,输入密码,由于刚安装,没有设置密码,直接回车 Enter 进入 

输入 show databases

设置root密码

mysql>use mysql; 
mysql>update user set password=password('your password') where user='root'; 
mysql>flush privileges;

如果想远程登录,通过以下命令,设置允许远程登录:

mysql>GRANT ALL PRIVILEGES ON *.* TO 'your username'@'%' IDENTIFIED BY 'your password' WITH GRANT OPTION;

your username 和 your password 改成 mysql 数据库的用户和密码

 

发布了294 篇原创文章 · 获赞 211 · 访问量 52万+

Guess you like

Origin blog.csdn.net/chehec2010/article/details/104322055