在龙芯3A6000笔记本电脑上安装LAMP
在龙芯3A6000笔记本电脑上安装LAMP
一、先用命令安装 apache2、php和mariadb-server:
sudo apt install apache2 php mariadb-server
二, phpmyadmin提示缺少mysqli。使用命令: sudo apt install php-mysql 安装,解决该问题。
安装后需重启apache2。重启apache2命令:sudo systemctl restart apache2
三、当mariadb10没有帐号密码或者忘记了帐号秘密时,可以使用如下方法设置帐号秘码。
转载。
https://www.cnblogs.com/areyousmoking/p/14429075.html
mariadb10的root账户初始密码以及修改
从软件管理器下载安装的mariadb10,发现用默认密码登录不进。首先修改配置文件,跳过密码登录,如下解决:
1. /etc/init.d/mysql stop
编辑配置文件,我的配置文件在/etc/mysql/mariadb.conf.d目录下。先检查/etc/mysql/my.cnf里看有没有[mysqld]配置块,若没有则继续找找该目录下的所有配置文件。
2. vim /etc/mysql/mariadb.conf.d/50-server.cnf
3. 在[mysqld] 下添加
skip-grant-tables=1
4. /etc/init.d/mysql start
5. mysql -uroot 无密码登录
6. 设置密码为root
use mysql;
update user set authentication_string=password('root'),plugin='mysql_native_password' where user='root';
flush privileges;
7. vim /etc/mysql/mariadb.conf.d/50-server.cnf
将skip-grant-tables=1 这句#注释掉
8. /etc/init.d/mysql stop
/etc/init.d/mysql start
用mysql -uroot -p 连接,输入root密码
四、游览器提示缺少php mbstring扩展,使用命令 :sudo apt install php-mbstring 安装该扩展。安装后需重启apache2。
五,登陆帐号时,图形文字验证码不能显示,使用命令 :sudo apt install php-gd 安装该扩展。安装后需重启apache2。