Mysql install on deepin linux#config deepin apt source#Copy
sudo vi /etc/apt/sources.listedit 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#Copy
system@system-PC:~/Downloads$ mysql --versionmysql Ver 15.1 Distrib 10.3.23-MariaDB, for debian-linux-gnu (aarch64) using readline 5.2使用 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)
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)创建一个用户 供开发使用 用户名:test 密码:test 可以本地和远程访问‘%’
create user 'test'@'%' identified by '123456';
赋予权限 权限可以分为多种 这里赋予所有权限all privileges .
grant all privileges on . to 'test' @'%' identified by '123456';
flush privileges;
exit;
test php#system@system-PC:/var/www/html$ sudo vi phpinfo.php