Openwrt里架设Lighttpd+PhP5+MYSQL环境标准教程(3)

时间:2025-07-12

Openwrt里架设Lighttpd+PhP5+MYSQL环境标准教程

/mnt/sda1/data

/mnt/sda1/data/mysql

/mnt/sda1/data/tmp

/bin/hostname

3,/etc/f ;

修改datadir = /mnt/sda1/data/mysql/

tmpdir = /mnt/sda1/data/tmp/

4,建立数据库

/usr/bin/mysql_install_db --force

/etc/init.d/mysqld start

mysql

quit

mysqladmin -u root password 00000000 ;这里设置用户root的密码为00000000

5,手动建立一个用户和数据库

mysql -u root -p

insert into er(Host,User,Password)

values("localhost","bbs",password("12345678"));

flush privileges;

create database bbsdb; grant all privileges on bbsdb.* to bbs@localhost identified by '12345678';

flush privileges;

quit;

6,如果想远程访问数据库

将f中的”bind-address = 127.0.0.1“注释掉

grant all privileges on *.* to identified by 'passwd';

flush privileges;

■■■■■■■■■■把网站的启动加入启动文件■■■■■■■■■■ 启动在/etc/rc.local文件加入如下命令

/etc/init.d/mysqld start

/etc/init.d/lighttpd start

■■■■■■■■■■把网站的文件上传到web文件■■■■■■■■■■ 上传网站文件到/mnt/sda1/web 循环设置权限777

备注:http://192.168.1.1:88是网站

网站如果在wan口开放还需要在wan口添加协议和端口规则(协议tcp 端口88)

Openwrt里架设Lighttpd+PhP5+MYSQL环境标准教程(3).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219