In this example we are going to change it from /phpmyadmin to /pma_hidden, though you can change it to whatever you want. Obscure phpMyAdmin URLīots and attackers continuously scan web servers for the phpMyAdmin login page, so it is recommended that you change the URL to something else. If you would like to set up some additional security for phpMyAdmin, continue to the next step. ![]() You should now be able to access phpMyAdmin using this new user account. GRANT ALL PRIVILEGES ON *.* TO WITH GRANT OPTION Now we will grant superuser privileges to our new user pmauser. CREATE USER IDENTIFIED BY 'password_here' If you want heightened security, you could replace this with an IP address. The % symbol tells MySQL to allow this user to log in from anywhere remotely. Make sure to replace password_here with your own ( generate a password). In this example we are calling it pmauser (php my admin user). ![]() Now add a new MySQL user with the username of your choice. You may have created a root password when you installed MySQL for the first time or the password could be blank, in which case you can just press ENTER when prompted for a password. If you weren’t able to log in as root above, you can now create a superuser account just for phpMyAdmin. If you get an error “Access denied for user you should continue to Step 4 to create a superuser just for phpMyAdmin. However, remote login might be disabled for root. You will have set up the root user and password when installing MySQL for the first time. If you don’t have a domain name yet and don’t know your IP, you can find out with: ifconfig | grep -Eo 'inet (addr:)?(*\.)*' | grep -v '127.0.0.1' You should now be able to access the phpMyAdmin web interface by visiting your server’s domain name or public IP address followed by /phpmyadmin. Here we will assume your document root is /var/sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin 3. Test phpMyAdmin The default location of the Nginx document root in Ubuntu 18.04 should be /var/Once you have confirmed your document root, let’s create a symbolic link from the phpMyAdmin directory to your document root. In order for Nginx to serve the phpMyAdmin files correctly, we must create a symbolic link from the phpMyAdmin directory /usr/share/phpmyadmin to the Nginx document root directory. The MySQL application password is only used internally by phpMyAdmin to communicate with MySQL. You can leave this blank and a password will be generated automatically. Select Yes and press ENTER to install and configure the database. If you are prompted to choose a web server like below, as there is no option for Nginx, press TAB and then ENTER to continue without selecting a web server. ![]() The order of the following screens in the phpMyAdmin Package configuration may vary depending on your setup. sudo apt update
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |