查看: 49611|回复: 0

arm64 UOS安装apache php mysql

[复制链接]

66

主题

66

帖子

710

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
710
发表于 2021-7-9 11:46:06 | 显示全部楼层 |阅读模式


Mysql install on deepin linux#config deepin apt source#Copy
sudo vi /etc/apt/sources.list
edit the content
Copy
#1. 统信UOS系统官方默认源sources.list文件## Generated by deepin-installerdeb [by-hash=force] https://professional-packages.chinauos.com/desktop-professional eagle main contrib non-free#deb-src [by-hash=force] https://professional-packages.chinauos.com/desktop-professional eagle main contrib non-freeinstall apache2 php mysql#Copy
sudo apt install apache2 php default-mysql-server default-mysql-clienttest apache2#Copy
browser http://127.0.0.1/
test mysql#
  • check version
Copy
system@system-PC:~/Downloads$ mysql --versionmysql  Ver 15.1 Distrib 10.3.23-MariaDB, for debian-linux-gnu (aarch64) using readline 5.2
  • root login
使用 mysql -uroot -p直接登录 [空密码] mysql
Copy
mysql> GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY "654321";mysql> GRANT ALL PRIVILEGES ON *.* TO root@127.0.0.1 IDENTIFIED BY "654321";
他们的区别 (通过localhost连接到mysql是使用UNIX socket,而通过127.0.0.1连接到mysql是使用TCP/IP)
  • update root password
Copy
mysql> update mysql.user set authentication_string=password('xxxxx') where user='root' and Host = 'localhost';Query OK, 1 row affected, 1 warning (0.00 sec)
  • create user
创建一个用户 供开发使用 用户名:test 密码:test 可以本地和远程访问‘%’
create user 'test'@'%' identified by '123456';
赋予权限 权限可以分为多种 这里赋予所有权限all privileges .
grant all privileges on . to 'test' @'%' identified by '123456';
flush privileges;
exit;
test php#
  • edit test page
system@system-PC:/var/www/html$ sudo vi phpinfo.php



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表