发表于: 2017-12-02 23:41:34
1 740
今天完成的事:
在centos上安装mysql成功。
重置了两次云主机,安装教程 http://blog.csdn.net/yym836659673/article/details/53965698
http://blog.csdn.net/huangjingqian/article/details/53894191
遇到的问题:
1、远程连接mysql失败,各种百度说的都差不多,第一步开启mysql的访问权限,第二步开启3306端口,这两步都完成了,仍然失败,崩溃。
访问权限开启:(查看访问权限 select host,user from user)
开启3306端口成功
2、Windows中mysql在试验中出了问题,可以忽略密码访问,现在还没搞好,是设置权限的问题,搜了好多都不对。
3、尝试卸载windows的mysql,出现问题,
百度说卸载mysql方法:1停止mysql,2控制面板卸载mysql,3删除安装目录,4删除注册表,
但是在控制面板中根本没有mysql的程序,没法卸载啊,但是在控制台又可以登录,迷!!!!
明天计划:
继续安装软件,今天基本没有进展。
收获:
1、mysql不需要输密码就能登录,原因可能是存在空用户。
查看是否存在空用户 :select count(*) from user where user='';
删除空用户:delect from mysql where user='';
刷新权限:flush privileges;
参考 http://blog.51cto.com/linzm/1275701
2、host是列是指定登录的ip,%是通配符,
https://zhidao.baidu.com/question/406393516.html
3、centos7是防火墙是firewall,之前的版本是iptables
查看防火墙状态 systemctl status firewalled firewall-cmd --state
开启防火墙:systemctl start firewalled
关闭防火墙:systemctl stop firewalled
重启防火墙:systemctl restart firewalled
开启3306端口:firewall-cmd --permament --zone=public --add-port=3306/tcp
开启防火墙操作 https://jingyan.baidu.com/article/5552ef47f509bd518ffbc933.html
https://www.5yun.org/10074.html
4、linus基本操作
删除文件 rm -f
保存修改并退出vi :wq
不保存修改退出vi :q
保存 :w
从根目录下查找文件 find / -name file1
查找属于用户的文件 find / -user user1
参考http://blog.csdn.net/o0darknessyy0o/article/details/52072054
评论