I’m using ubuntu 22.04 to install magento2.4.6, but I’m confused about sudo chown -R user_name:www-data ., what should the user_name be, ubuntu or root. The default ssh user of ubuntu 22.04 is ubuntu.
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'demo12345679!';
mysql> CREATE USER 'magento'@'localhost' IDENTIFIED BY 'demo12345679!';
mysql> ALTER USER 'magento'@'localhost' IDENTIFIED WITH mysql_native_password BY 'demo12345679!';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'magento'@'localhost' WITH GRANT OPTION;
mysql -u magento -p
mysql> CREATE DATABASE magento;