phpmyadmin
Install phpMyAdmin with a cookie-based single sign-on bridge, or grant a hosted domain's MySQL user access to its own databases
- Command:
/go/phpmyadmin - Category: Database
- Required option: None for install; a domain name for privilege granting
- Output: A progress indicator during install; no output for privilege granting
- Last updated: 2026-11-21
On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also
Overview
/go/phpmyadmin does two unrelated things, chosen by how you call it:
- With no arguments, or with
--installanywhere in the arguments — (re)installs phpMyAdmin itself from the official tarball, patched to auto-log in using two browser cookies instead of phpMyAdmin's normal login form. - With a domain name, or
all— grants that domain's (or every domain's) MySQL userALL PRIVILEGESon its own databases. This does not touch the phpMyAdmin software at all.
[!WARNING] The same first argument (
$1) means different things depending on how it's used: a phpMyAdmin version when installing, a domain name otherwise./go/phpmyadmin 5.2.4alone (no--install) is read as a request to grant privileges to a domain literally named5.2.4, not as "install version 5.2.4". To install a specific version, you must include--installas well:/go/phpmyadmin 5.2.4 --install.
The command re-runs itself with sudo when started by a non-root user. The call is appended to /var/log/go/phpmyadmin.log.
Quick start
# Install phpMyAdmin (default version)
/go/phpmyadmin
# Grant one domain's MySQL user access to its databases
/go/phpmyadmin example.com
# Grant every hosted domain
/go/phpmyadmin all
Syntax
/go/phpmyadmin
/go/phpmyadmin <version> --install
/go/phpmyadmin <domain>
/go/phpmyadmin all
| Form | Behavior |
|---|---|
/go/phpmyadmin |
Installs the default version (currently 5.2.3). |
/go/phpmyadmin <version> --install |
Installs that specific version instead. |
/go/phpmyadmin <domain> |
Grants ALL PRIVILEGES on that domain's own databases to a MySQL user named after the domain. |
/go/phpmyadmin all |
Runs the single-domain grant for every account with a www folder. |
Before installing, the command refuses to run if the server has less than 512 MB of total RAM.
Options
| Argument | Notes |
|---|---|
<version> |
A phpMyAdmin release number matching a tarball at files.phpmyadmin.net. Only takes effect together with --install. |
--install |
Forces install mode, whatever else is on the command line. |
<domain> |
A hosted domain, to grant privileges for. |
all |
Grants privileges for every hosted domain, one after another. |
Output
Install mode shows a progress indicator ("Installing phpMyAdmin <version>") followed by curl/tar/mariadb output. Privilege-granting mode prints nothing on success.
Examples
# Install the default version
/go/phpmyadmin
# Install a specific version
/go/phpmyadmin 5.2.4 --install
# Grant one domain
/go/phpmyadmin example.com
# Grant every domain
/go/phpmyadmin all
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
phpMyAdmin requires at least 0.5 GB of RAM to install. |
The server has less than 512 MB of total installed RAM (not current free memory). | Use a server with more RAM, or install phpMyAdmin manually if you understand the trade-offs. |
| A version number you passed was silently ignored, and nothing seemed to install | It was read as a domain name, not a version, because --install wasn't included. |
Add --install: /go/phpmyadmin <version> --install. |
| phpMyAdmin is missing entirely after trying to reinstall it | The existing install is deleted before the new download is confirmed; a failed or interrupted download leaves nothing in its place. | Check your network access to files.phpmyadmin.net, confirm the version number exists as a release, and run the command again. |
| phpMyAdmin logs you in automatically with the wrong account, or not at all | The cookie-based login patch (see Details) wasn't applied — likely because the installed version's config.sample.inc.php doesn't match the exact text this command's sed looks for. |
Check config.inc.php for the CookiesMySQLUsername/CookiesMySQLPassword block; if it's missing, the patch silently didn't apply for that version. |
| A domain's database user can connect with no password at all | That domain's Salt value in the Site table is empty, so the grant sets an empty password. |
Check select Domain, Salt from site.db where Domain='<domain>'; make sure every account has a non-empty Salt before relying on this. |
| The grant for a domain seems to do nothing, or targets a user that doesn't exist | The command grants privileges to a MySQL user named exactly after the domain, which may not match the username convention your databases actually use (see mysql). |
Check which MySQL user actually owns the domain's databases, and grant privileges to that user directly if it differs. |
| Privilege granting fails with a MySQL username-length error for a long domain | MySQL usernames are limited to 32 characters; a domain name longer than that can't be used as a username at all. | Shorten the target username, or grant privileges manually for that account. |
Details
Installing (no arguments, or --install)
- Deletes any existing install at
/usr/local/goadmio/home/go/phpmyadmin. - Downloads
phpMyAdmin-<version>-all-languages.tar.gzfromfiles.phpmyadmin.netover HTTPS, with no checksum or signature check against phpMyAdmin's own published hashes. - Extracts it, renames the extracted folder to
phpmyadmin, and copiesconfig.sample.inc.phptoconfig.inc.php. - Creates a world-writable (
777)tmpfolder inside it, which phpMyAdmin needs for uploads and imports. - Patches
config.inc.php, replacing the defaulthostline with a block that reads a MySQL username and password straight from two cookies (CookiesMySQLUsername,CookiesMySQLPassword) and logs in as that user automatically if the cookies are present — this is how GoAdmio's own panel likely gives a logged-in user one-click access to phpMyAdmin without a separate login step. - Writes a
logout.phpthat clears both cookies and redirects back to the login page. - Creates the
phpmyadminconfiguration-storage database and imports its tables fromsql/create_tables.sql. - Grants
root@localhostfull privileges on everything and reaffirms its password — a side effect bundled into the install step, not obviously related to phpMyAdmin itself.
Granting privileges (a domain, or all)
For the named domain, every database registered to it in mysql.db is granted ALL PRIVILEGES to a MySQL user named exactly after the domain, authenticated with the domain's stored Salt value as the password. all repeats this for every hosted account.
Known issues
- Delete-before-download, again. As with
ffmpegandinstallgo, the existing install is removed before the replacement is confirmed to have downloaded and extracted successfully. - No checksum verification on the downloaded tarball.
- The cookie-based login passes literal MySQL credentials, not a token. Whatever is in
CookiesMySQLPasswordis used as-is to authenticate to MySQL. Protecting these cookies (transport security,HttpOnly/Secureflags, scoping) is equivalent to protecting the database password itself; this command doesn't set the cookies, so how well they're protected depends on whatever sets them elsewhere. - The patch that enables the cookie login is an exact-text
sedmatch against one specific line ofconfig.sample.inc.php. If a different phpMyAdmin version formats that line differently, the patch silently does nothing — no error, just a phpMyAdmin install without the single sign-on feature. - An empty
Saltproduces an empty password. The grant statement usesSaltdirectly; if it's unset for a domain, that domain's database user gets no password at all. - The grant targets a MySQL user named after the full domain, which may not match the username your databases actually use (see
mysql), and domains longer than MySQL's 32-character username limit can't be granted this way at all. - The world-writable
tmpfolder (777) is broader than it needs to be; scoping it to the web server's user and group would be tighter. $1means two different things depending on whether--installis present — see the warning above.
See also
| Command | Description |
|---|---|
mysql |
Create a MySQL database |
mysqlreset |
Change the MySQL root password in safe mode |
mysqlset |
Change the MySQL root password |
installmariadb |
Install or update MariaDB to the latest version |
ffmpeg |
Rebuild ImageMagick from source and install FFmpeg from the Nux Dextop repository — CentOS 7 (EL7) only |
installgo |
Install a pinned Go release on the RHEL family from the official tarball — on Debian and Ubuntu, this only repairs a broken dpkg state and does not install Go |