install_apache_mysql_php_linux_ubuntu_server
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
install_apache_mysql_php_linux_ubuntu_server [2020/06/08 16:52] – [Install MySQL Database Server] wikiadmin | install_apache_mysql_php_linux_ubuntu_server [2020/06/08 22:56] – [Create a new admin user or new root user and password with access from any IP remotely] wikiadmin | ||
---|---|---|---|
Line 165: | Line 165: | ||
< | < | ||
- | //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 | ||
Line 176: | Line 176: | ||
**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// | + | //MEDIUM Length >= 8, numeric, mixed case, and special characters// |
+ | |||
+ | //STRONG Length >= 8, numeric, mixed case, special characters and dictionary file// | ||
**Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2** | **Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2** | ||
+ | |||
//Please set the password for root here.// | //Please set the password for root here.// | ||
Line 189: | Line 192: | ||
**Re-enter new password:** | **Re-enter new password:** | ||
- | //Estimated strength of the password: 100 | + | //Estimated strength of the password: 100// |
- | Do you wish to continue with the password provided? | + | |
- | By default, a MySQL installation has an anonymous user, | + | **Do you wish to continue with the password provided? |
+ | |||
+ | //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 | ||
Line 203: | Line 208: | ||
- | Normally, root should only be allowed to connect from | + | //Normally, root should only be allowed to connect from |
' | ' | ||
- | 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** //(n should be considered)// | **Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y** //(n should be considered)// | ||
Line 211: | Line 216: | ||
// | // | ||
- | By default, MySQL comes with a database named ' | + | //By default, MySQL comes with a database named ' |
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... | + | |
+ | // - Dropping test database...// | ||
// | // | ||
- | - Removing privileges on test database... | + | ** - Removing privileges on test database...** |
- | **Success.** | + | //Success.// |
- | Reloading the privilege tables will ensure that all changes | + | //Reloading the privilege tables will ensure that all changes |
- | made so far will take effect immediately. | + | made so far will take effect immediately.// |
**Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y** | **Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y** | ||
// | // | ||
+ | |||
+ | //All done!// | ||
</ | </ | ||
+ | ===== Installing phpMyAdmin ===== | ||
+ | |||
+ | phpMyAdmin is a web interface to manage MySQL databases and user privileges. | ||
+ | |||
+ | < | ||
+ | |||
+ | When prompted during installation, | ||
+ | |||
+ | 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. | ||
+ | |||
+ | < | ||
+ | sudo mysql -u root -p | ||
+ | </ | ||
+ | |||
+ | **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. | ||
+ | |||
+ | < | ||
+ | CREATE USER ' | ||
+ | |||
+ | CREATE USER ' | ||
+ | |||
+ | CREATE USER ' | ||
+ | </ | ||
+ | |||
+ | So, for example, this should work (and ensure that you are logged into the console prompt at mysql> | ||
+ | |||
+ | < | ||
+ | CREATE USER ' | ||
+ | |||
+ | </ | ||
+ | |||
+ | Now, let's grant the new rootuser user all privileges including with Grant Option, like this: | ||
+ | < | ||
+ | GRANT ALL PRIVILEGES ON *.* TO ' | ||
+ | </ | ||
+ | And, then run this command: | ||
+ | < | ||
+ | FLUSH PRIVILEGES; | ||
+ | </ | ||
+ | Now, go log into phpmyadmin through a webpage on a remote device with the username rootuser and the password you installed for rootuser. You should have success now. | ||
install_apache_mysql_php_linux_ubuntu_server.txt · Last modified: 2020/06/08 23:20 by wikiadmin