0%

防火墙开放3306端口

iptables -A INPUT -p tcp --dport 3306 -j ACCEPT

修改数据库

user mysql;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '123456' WITH GRANT OPTION;
说明:root是登陆数据库的用户,123456是登陆数据库的密码,*就是意味着任何来源任何主机反正就是权限很大的样子。
flush privileges;

忘记xampp mysql的密码

  • 停止mysql服务器

    sudo /opt/lampp/lampp stopmysql

  • 使用--skip-grant-tables 参数来启动 mysqld

    sudo /opt/lampp/sbin/mysqld --skip-grant-tables

  • 再开一个终端(在终端中直接右键+B) 进入mysql

    sudo /opt/lampp/bin/mysql -uroot

  • 修改密码

    use mysql;
    update user set password=password("123456") where user="root";
    flush privileges;

  • 重启服务

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment