Chapter 3: Remote Servers Up Part I: MySQL administration via NodeWorx Part II: Advanced MySQL Administration and Management 

4 phpMyAdmin

This will be a rather brief chapter for 2 reasons:
  1. phpMyAdmin is rather user friendly and intuitive to use.
  2. phpMyAdmin has it’s own documentation if you actually are stuck.

4.1 Basics

phpMyAdmin is a nice web-based front end to a MySQL server and its databases. By default, it only shows you the databases that the MySQL user you are logged in as is permitted to see. A screen shot is shown in figure 4.1↓.
figure images/siteworx/mysql/mysql-php-my-admin.png
Figure 4.1 phpMyAdmin

4.1.1 phpMyAdmin inside NodeWorx

When using phpMyAdmin in NodeWorx, you are logged in as the iworx MySQL user, which has root privileges. As a result, you will be able to see all databases and tables on your MySQL server, as well as modify them freely.
In the event that you have remote servers or you have debugging mode enabled[G][G]Debugging mode can be activated in NodeWorx under Server ▷ Settings, when clicking the phpMyAdmin link, you will be taken to a landing page which will display a drop down box of all the database servers that InterWorx can interface with. The reason debugging mode causes this to occur is because debugging mode will allow you to see the control panel’s database server (the separate, segregated server that the control panel uses to store NodeWorx and SiteWorx meta data). This is useful if you are a more technical user and have enough experience to look at the InterWorx database. We strongly discourage modifying anything directly in the InterWorx database without guidance from InterWorx support. This could lead to unexpected results and or serious issues for your server.

4.1.2 phpMyAdmin in SiteWorx

In SiteWorx, phpMyAdmin operates a bit differently. Since there can be multiple MySQL users in a SiteWorx account, we can’t just log the user in as a given user and expect them to see all their databases. Instead, InterWorx creates a temporary MySQL user on demand which has access to all the databases of a given SiteWorx account.
phpMyAdmin can be an invaluable tool for debugging issues with web applications, fixing data integrity issues, importing large data sets, exporting large data sets, creating new databases, and designing the database structure.

4.2 Common Session Issue

The most common issue we see is that NodeWorx admins (read: users who are able to log in and out of different SiteWorx accounts) often will go into phpMyAdmin in multiple accounts, or go into phpMyAdmin in NodeWorx, then log into a SiteWorx account and go to phpMyAdmin in SiteWorx without explicitly clicking the logout button in phpMyAdmin. Since phpMyAdmin is opened in a tab, often users will simply close their tab instead of explicitly clicking logout. While this does not matter for a SiteWorx user with multiple accounts, occasionally NodeWorx administrators who move between SiteWorx account’s phpMyAdmin or move between NodeWorx phpMyAdmin and SiteWorx phpMyAdmin without explicitly clicking the green logout button will see that the session from the last-used phpMyAdmin session will appear instead of the one they were expecting.
InterWorx tries to mitigate reloading and re-creation of the temporary SiteWorx MySQL accounts unnecessarily, and thus it defaults to using the last session, if it’s still valid. If you have not closed your browser and you switch between phpMyAdmin’s, it will appear that a SiteWorx account might be seeing someone ease’s data when in reality it is only your web browser (as the NodeWorx server admin) that has the capability (temporarily). This can be fixed by clicking the green logout button in phpMyAdmin, (as that will explicitly flush the phpMyAdmin session), and clicking the phpMyAdmin button again. Alternatively, you can just close your web browser and re-open it.
 Chapter 3: Remote Servers Up Part I: MySQL administration via NodeWorx Part II: Advanced MySQL Administration and Management 

(C) 2019 by InterWorx LLC