阿里云服务器上安装mysql服务器

今天购买了阿里云的服务器,先上面搭建mysql服务器的时候,遇到了一些问题,现在将其总结如下:

1、在安装的时候提示:

This application requires the .NET framework. Please install the .NET Framework and try again,or contact the publisher of this application for additional information

表示需要先安装.NET framework

解决方法:下载.NET framework4.0的程序,并安装在阿里云服务器上,该程序较大,请到这个地址下载:http://dlwt.csdn.net/fd.php?i=614239463362498&s=596d8e75aea4f30d5980c044eb916ad1,大家可以直接下载(注意:下载的包中,会有两个安装程序,先安装wic_x86_chs.exe,然后再安装dotNetFx40_Client_x86_x64.exe),安装完毕后,就可以安装mysql服务器了。

2、mysql服务器安装完毕之后,再云服务器上,可以用root登录,但是从本地使用root连接不上,后经过查询,发现root没有远程登录的权限。

解决方法一(采纳了):

在与服务器上的mysql服务器上,创建一个新用户,然后将远程登录的权限赋给该用户。

具体sql语句:

//创建用户 hengxin   密码123456

   create user hengxin identified by '123456';

   //授权 该用户可以从任何ip地址远程登录服务器

   GRANT ALL PRIVILEGES ON test.* TO 'hengxin'@'%'WITH GRANT OPTION; 

   FLUSH PRIVILEGES;

   这样就可以在本地使用hengxin连接到云服务器上的mysql了。

 

   方法二:

   更改root的访问限制

   use mysql;

   select host,user from user where user = 'root';

   update user set host = '%' where user = 'root';

   commit;

   

猜你喜欢

转载自luojun-0513.iteye.com/blog/1871388