Install Lamp stack
Revision as of 20:49, 19 May 2022 by Bacchas (talk | contribs) (Created page with " sudo apt install tasksel sudo tasksel install lamp-server ==MySQL== '''Log in to MySQL’s SQL shell:''' sudo mysql -u root '''About MySQL authentication''' '''By default, MySQL is configured to use the auth_socket authorization plugin. This authorization … '''Create a database and a user with permissions for it. In this example, the database is called webdata, the user webuser, and password password. Be sure to enter your own password. This should be different...")
sudo apt install tasksel
sudo tasksel install lamp-server
MySQL
Log in to MySQL’s SQL shell:
sudo mysql -u root
About MySQL authentication By default, MySQL is configured to use the auth_socket authorization plugin. This authorization …
Create a database and a user with permissions for it. In this example, the database is called webdata, the user webuser, and password password. Be sure to enter your own password. This should be different from the root password for MySQL:
- CREATE DATABASE webdata;
- CREATE USER 'webuser' IDENTIFIED BY 'password';
- GRANT ALL ON webdata.* TO 'webuser';
Exit the SQL shell:
quit
Use the mysql_secure_installation tool to configure additional security options. This tool will ask if you want to set a new password for the MySQL root user, but you can skip that step:
sudo mysql_secure_installation
Answer Y at the following prompts:
- Remove anonymous users?
- Disallow root login remotely?
- Remove test database and access to it?
- Reload privilege tables now?