The windows server 2008 server uses MySQL

foreword

Recently, I am learning to use node to develop the background. Take notes about MySQL here.

1. MySQL historical version download

Official Portal    5.7.24 Installation Tutorial Portal

2. The runtime library is missing, prompting MSVCR120.dll.

Download the Microsoft runtime library or some integrated library and install it. Or download directly from the address I provided. Portal

3. If you forget the password, change the mysql password.

// 关闭服务
net stop mysql
// 在一个dos窗口,进入bin目录
mysqld --skip-grant-tables
// 另外开一个dos窗口,刚才那个不要动
mysql
use mysql
update mysql.user set authentication_string=passowrd('密码') where user='root';
flush privileges;
exit
//重启服务

update mysql.user set password=password('密码') where user='root'

Error ERROR 1054(42S22) Unknown column 'password' in 'field list' after execution

The reason for the error is that there is no password field in the mysql database under version 5.7, and the password field has been changed to authentication_string

4. Enable remote access

// 直接授权,直接赋予root权限,在任何主机上访问的时候
# mysql -u root -p
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'youpassword' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;

 

Guess you like

Origin blog.csdn.net/QiZi_Zpl/article/details/105817809
Recommended