glowfoki.blogg.se

Change phpmyadmin password ubuntu
Change phpmyadmin password ubuntu













change phpmyadmin password ubuntu

To execute the instructions in this tutorial, you need access to the Linux command line or SSH. Make a symbolic link to /usr/share/phpmyadmin the virtualhost document root.In this tutorial, we cover the following topic: 1) set and change MySQL password (root and user password) in Linux operating system, such as centOS, AlmaLinux … and recover it if you forget it.

change phpmyadmin password ubuntu

If you have other sites that you need to have access to port 80 and the Listen directive to that Virtualhost.Īlternatively, you could restrict Phpmyadmin to only one specific port by creating a Phpmyadmin version host and use the Listen 99 directive to that virtual host.ĭetails for creating a virtual host for Apache2 can be found here: In most circumstance, disabling the default port 80 isn't necessary. To disable port 80 where you can only have access via port 99, comment out or remove the Listen 80 from the configuration.ĭisabling the default port is a little more detailed This adds port 99 to the available access. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet # have to change the VirtualHost statement in # If you just change the port or add more ports here, you will likely also With iptables you can do that by this command: sudo iptables -A INPUT -p tcp -m tcp -dport 99 -j ACCEPTĪdding access via port 99 is quick and easyĪdd the port 99 to your Apache2 configuration. If you use UFW you can do that by this command: sudo ufw allow 99/tcp If you want this new VirtualHost to be accessible from the outside don't forget to add port 99 into your firewall's rules. This step is optional, but otherwise and will provide identical result, so I suppose we do not need that :) Edit /etc/phpmyadmin/nf and comment ( #) the first Alias directive like thath: #Alias /phpmyadmin /usr/share/phpmyadmin a2ensite phpmyadmin will enable the new VirtualHost, described in 2.a2disconf phpmyadmin will disable the default phpMyAdmin's configuration, described in 1.Switch Apache's configuration and restart it. Thus /etc/phpmyadmin/nf will be included only for the current VirtualHost! Instead of this directive you can copy/paste the content of /etc/phpmyadmin/nf in this place.ģ. Include /etc/phpmyadmin/nf this directive includes the default phpMyAdmin's configuration into Apache's configuration. But you can add specific rules here, for example you can Set Up Password Authentication ĭocumentRoot /usr/share/phpmyadmin this directive sets /usr/share/phpmyadmin as directory that forms the main document tree visible from the web, for the current VirtualHost this directive is optional because the access permissions for /usr/share/ are usually set in /etc/apache2/nf. (Usually there have ServerName set on the Server level - in /etc/apache2/nf) ServerName localhost this directive is optional and can be customised according to your needs. defines a VirtualHost which will handle the requests form all interfaces ( *) on port :99. Like says you can put this directive in /etc/apache2/nf or you can leave it here Listen 99 instructs Apache2 to listen on port 99. The content of this file should looks like: Listen 99ĮrrorLog $/ combined Let's call it nf and create it by nano (or you can use your favorite text editor): sudo nano /etc/apache2/sites-available/nf Create new VirtualHost configuration file. This file is a symbolic link to the file /etc/apache2/conf-available/nf, which is a symbolic link to the file /etc/phpmyadmin/nf, which will be used in the next step.Ģ. By default (within Ubuntu 16.04) PhpMyAdmin is included (and enabled) into the Apache's configuration ( for all VirtualHosts!) through this additional configuration file: /etc/apache2/conf-enabled/nf Understanding of the default configuration of PhpMyAdmin. Just to be clear, this is not a setting of PhpMyAdmin, it is a setting of the configuration of Apache2, and we need to create new VirtualHost for this purpose.ġ.















Change phpmyadmin password ubuntu