wesupport

Need help?

Our experts have had an average response time of 13.14 minutes in February 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

PhpMyAdmin redirecting due to read-only /tmp – How to fix it?

by | Oct 18, 2021

Most often, MySQL causes the error, PhpMyAdmin redirecting due to read-only /tmp.

As part of our Server Management Services, we assist our customers with several PHP queries.

Today, let us see how we can fix this error.

 

PhpMyAdmin redirecting due to read-only /tmp

At times, PhpMyAdmin may encounter a redirect loop where it appears stuck with the warning, “The system will redirect you in a moment.”

Generally, this happens when MySQL cannot create a temporary user to access phpMyAdmin.

This will eventually reflect in the /usr/local/cpanel/logs/error_log with the following error:

Cpanel::Exception::Database::Error/(XID 9a8sak) The system received an error from the “MySQL” database “mysql”: 1 (Can’t create/write to file ‘/tmp/#sql_5a2_0.MAI’ (Errcode: 30 “Read-only file system”))

To verify the status of the /tmp and /var/tmp file systems, we need to look at our current mounts:

# mount -l | grep -i "tmpDSK" 
/usr/tmpDSK on /tmp type ext4 (ro,nosuid,noexec,relatime,seclabel,discard,data=ordered) 
/usr/tmpDSK on /var/tmp type ext4 (ro,nosuid,noexec,relatime,seclabel,discard,data=ordered)

Here, we only need to remount the filesystem found in a different state such as “Read Only”.

The operating system sets the filesystems to Read-only when there is an error with the filesystem or the disk.

When a filesystem is set to Read-Only, we cannot write any data can and this prevents services and other tasks from completing properly leading to a non-functioning server.

Eventually, to remount the filesystem, we run:

mount -o remount,rw /tmp

Here, the “/tmp” represents the filesystem we wish to remount.

However, make note that the cPanel support staff does not manage the filesystems for us. We need to do it on our own or the administrator will need to perform this task.

[Need help with the remount? We’d be happy to assist you]

 

Conclusion

In short, ‘PhpMyAdmin redirecting due to read-only /tmp’ happens when MySQL cannot create a temporary user to access phpMyAdmin. Today, we saw how our Support Techs fix this for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags