Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


install_apache_mysql_php_linux_ubuntu_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
install_apache_mysql_php_linux_ubuntu_server [2020/06/08 16:31] – [Installing Apache2 web server, MySQL database server, and PHP language interpreter, on Ubuntu Server] wikiadmininstall_apache_mysql_php_linux_ubuntu_server [2020/06/08 22:49] – [Installing phpMyAdmin] wikiadmin
Line 164: Line 164:
 <code>sudo mysql_secure_installation</code> <code>sudo mysql_secure_installation</code>
  
-<code+<QUOTE
-Securing the MySQL server deployment.+//Securing the MySQL server deployment.//
  
-Connecting to MySQL using a blank password.+//Connecting to MySQL using a blank password.//
  
-VALIDATE PASSWORD COMPONENT can be used to test passwords+//VALIDATE PASSWORD COMPONENT can be used to test passwords
 and improve security. It checks the strength of password and improve security. It checks the strength of password
 and allows the users to set only those passwords which are and allows the users to set only those passwords which are
-secure enough. Would you like to setup VALIDATE PASSWORD component? +secure enough. Would you like to setup VALIDATE PASSWORD component?// 
  
-Press y|Y for Yes, any other key for No: y+**Press y|Y for Yes, any other key for No: y**
  
-There are three levels of password validation policy:+//There are three levels of password validation policy://
  
-LOW    Length >= 8 +//LOW    Length >= 8//
-MEDIUM Length >= 8, numeric, mixed case, and special characters +
-STRONG Length >= 8, numeric, mixed case, special characters and dictionary  file+
  
-Please enter 0 LOW1 = MEDIUM and 2 = STRONG: 2 +//MEDIUM Length >8, numeric, mixed case, and special characters//
-Please set the password for root here.+
  
-New password:+//STRONG Length >= 8, numeric, mixed case, special characters and dictionary file//
  
-Re-enter new password:+**Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG2**
  
-Estimated strength of the password: 100 +//Please set the password for root here.// 
-Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y + 
-By default, a MySQL installation has an anonymous user,+**New password:** 
 + 
 +**Re-enter new password:** 
 + 
 +//Estimated strength of the password: 100// 
 + 
 +**Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y** 
 + 
 +//By default, a MySQL installation has an anonymous user,
 allowing anyone to log into MySQL without having to have allowing anyone to log into MySQL without having to have
 a user account created for them. This is intended only for a user account created for them. This is intended only for
 testing, and to make the installation go a bit smoother. testing, and to make the installation go a bit smoother.
 You should remove them before moving into a production You should remove them before moving into a production
-environment.+environment.//
  
-Remove anonymous users? (Press y|Y for Yes, any other key for No) : y +**Remove anonymous users? (Press y|Y for Yes, any other key for No) : y**
-Success.+
  
 +//Success.//
  
-Normally, root should only be allowed to connect from+ 
 +//Normally, root should only be allowed to connect from
 'localhost'. This ensures that someone cannot guess at 'localhost'. This ensures that someone cannot guess at
-the root password from the network.+the root password from the network.//
  
-Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y +**Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y** //(n should be considered)//
-Success.+
  
-By default, MySQL comes with a database named 'test' that+//Success.// 
 + 
 +//By default, MySQL comes with a database named 'test' that
 anyone can access. This is also intended only for testing, anyone can access. This is also intended only for testing,
 and should be removed before moving into a production and should be removed before moving into a production
-environment.+environment.//
  
  
-Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y +**Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y**
- - Dropping test database... +
-Success.+
  
- Removing privileges on test database... +// Dropping test database...//
-Success.+
  
-Reloading the privilege tables will ensure that all changes +//Success.//
-made so far will take effect immediately.+
  
-Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y +** - Removing privileges on test database...**
-Success.+
  
-All done!+//Success.// 
 + 
 +//Reloading the privilege tables will ensure that all changes 
 +made so far will take effect immediately.// 
 + 
 +**Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y** 
 + 
 +//Success.// 
 + 
 +//All done!// 
 + 
 +</QUOTE> 
 + 
 +===== Installing phpMyAdmin ===== 
 + 
 +phpMyAdmin is a web interface to manage MySQL databases and user privileges.  Install phpMyAdmin on Ubuntu 20.04 LTS as follows: 
 + 
 +<code>sudo apt install phpmyadmin</code> 
 + 
 +When prompted during installation, select "Apache" as the web server running phpMyAdmin. 
 + 
 +When prompted to create the phpMyAdmin database, provide your admin user access details and take the remaining steps to complete the installation. 
 + 
 +===== Workaround Errors in setting up phpmyadmin@localhost with all privileges involving dbconfig-common ===== 
 + 
 +==== Create a new admin user or new root user and password with access from any IP remotely ==== 
 + 
 +Using SSH access to the Ubuntu Server, log into the mysql console using as the user root with the password for root that was established when installing MySQL database server on Ubuntu.  This will put us into the console mysql> 
 + 
 +<code> 
 +sudo mysql -u root -p
 </code> </code>
  
 +**Enter password:**
  
 +Now, Create a new MySQL admin/root user with all privileges including GRANT privileges and make sure that the user can login from any IP remotely rather than only having privileges from @localhost. There are 3 choices of commands in the code block below, and the third choice will actually allow for logging into PhpMyAdmin as a root user.
  
 +<code>
 +CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
  
 +CREATE USER 'username'@'ip_address' IDENTIFIED BY 'password';
 +
 +CREATE USER 'username'@'%' IDENTIFIED BY 'password';
 +</code>
 +
 +So, for example, this should work (and ensure that you are logged into the console prompt at mysql>
 +
 +<code>
 +CREATE USER 'rootuser'@'%' IDENTIFIED BY 'MyComplex54321Pwd!';
 +
 +</code>
  
    
install_apache_mysql_php_linux_ubuntu_server.txt · Last modified: 2020/06/08 23:20 by wikiadmin