![]() Now Start the database without loading the grant tables or enabling networking: sudo mysqld_safe -skip-grant-tables -skip-networking & To change the root password, you have to shut down the database server beforehand. Grant all privileges on all databases: grant all privileges on *.* to with grant option įlush privileges and exit flush privileges ![]() Log into MariaDB server from the command line: sudo mysql -u rootĬreate an admin user with password authentication: create user identified by 'your-preferred-password' To fix that create another user with privileges: MariaDB root login might give you error on login. Run the following command to obtain and install TLS certificate: sudo certbot -apache -agree-tos -redirect -hsts -staple-ocsp -must-staple -d -email Troubleshoot phpMyAdmin Login Error Run the following command to install the Let’s Encrypt client (certbot) from Ubuntu 20.04 repository: sudo apt install certbot python3-certbot-apache You can now access the phpMyAdmin subdomain: Enable HTTPS on phpMyAdmin with Apache Reload Apache: sudo systemctl reload apache2 Header always set Content-Security-Policy upgrade-insecure-requestsĮnable this virtual host: sudo a2ensite nf Header always set Strict-Transport-Security "max-age=31536000" SSLCertificateKeyFile /etc/letsencrypt/live//privkey.pem SSLCertificateFile /etc/letsencrypt/live//fullchain.pem If running UFW, do this: sudo ufw allow 80,443/tcpĬreate a DNS record for the subdomain in Route 53 Ĭreate 2 new VirtualHost files nf and nf:įirst create nf with this command and add the info in the file below: sudo nano /etc/apache2/sites-available/nf # pma subdomainĬustomLog $/ combined Sudo iptables -I INPUT -p tcp -dport 443 -j ACCEPT If running on a local computer, open port 80 and 443: sudo iptables -I INPUT -p tcp -dport 80 -j ACCEPT If connection is refused, check your firewall or security group setting. If running on localhost: localhost/phpmyadmin sudo ln -s /etc/phpmyadmin/nf /etc/apache2/conf-available/nfĪgain Now run the following command to check if the /etc/apache2/conf-enabled/nf file exists file /etc/apache2/conf-enabled/nf Accessing phpMyAdmin from a Sub-directory /phpmyadmin You can fix it with the following commands. If this file doesn’t exist on your server, it’s likely that you didn’t select Apache web server in the phpMyAdmin setup wizard. etc/apache2/conf-enabled/nf: symbolic link to. If there’s no error in the installation process, you should see the following command output. ![]() Now run the following command to check if the /etc/apache2/conf-enabled/nf file exists. You can check the previleges this user has by logging in with: sudo mysql -u root This creates a DB named phpmyadmin with user phpmyadmin. Then set a password for the phpmyadmin user in MariaDB/MySQL. In the next screen, select Yes to configure a database for phpMyAdmin with dbconfig-common. Then hit Tab key and Enter to confirm your choice. (An asterisk indicates the item is selected). Notes: When it prompts you to select a web server to configure, hit the space bar to select apache2. Download and Install phpMyAdmin on Ubuntu 20.04 sudo apt update It provides a graphical web interface for users to manage MySQL or MariaDB database. PhpMyAdmin is a free and open-source web-based database management tool written in PHP. Change the domain name ( server_name) as per your requirement.Install phpMyAdmin with Apache on AWS Ubuntu 20.04 Use the following server block to create a virtual host for phpMyAdmin. GRANT ALL ON phpmyadmin.* TO ' PRIVILEGES Ĭreate a virtual host configuration file for phpMyAdmin under the /etc/nginx/conf.d directory. sudo mysql <</a> /usr/share/phpMyAdmin/sql/create_tables.sql -u root -pĪdd the user and grant permission to phpMyAdmin’s configuration database. Import the create_tables.sql to create tables for phpMyAdmin. * User used to manipulate with storage */ * phpMyAdmin configuration storage settings. This user account is used to access phpMyAdmin configuration storage. Change the controluser and controlpass with your user and password who have access to phpMyAdmin’s configuration database which we will create in the next step.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |