Q: Inside webmin I cannot create new databases or users, I get the error:
DBI connect failed : Access denied for user ‘my_user_nam_here’@’%’ to database ‘mysql’
How can I fix this?
A: You need to login to mysql as the mysql admin user (usually called root). Normally if you login to webmin as root it will login you into MySQL as root too. If this does not work, fix it with:
Click “MySQL Databaseservers”
Click “Module Config” on the MySQL screen (top left)
Change “Administration login” to either automatic (should work) or “root”
Under certain conditions the RPM database used by yum will become corrupt. Here is how to resolve this issue. You may see an error such as “Warning: RPMDB altered outside of yum” or “error: rpmdbNextIterator”
1. Take a backup FIRST, before trying to have rpm repair the database.
tar zcvf /var/preserve/rpmdb-[today's date].tar.gz rpm
Verify integrity with
rm -f __db* # to avoid stale locks
Next run the following:
mv Packages Packages.orig
/usr/lib/rpm/rpmdb_dump Packages.orig | /usr/lib/rpm/rpmdb_load Packages
Finally rebuild the database:
rpm -vv --rebuilddb
for the error :
mv /var/lib/rpm/Pubkeys /var/lib/rpm/Pubkeys.backup
rpm --rebuilddb -vv to recreate the index.
from : https://bugzilla.redhat.com/show_bug.cgi?id=108915
reference : http://kbase.redhat.com/faq/docs/DOC-6904#
Assuming you are using CentOS/Fedora/RedHat , as root type :
<pre>yum -y groupinstall ‘Development Tools'</pre>
If you are using a debian-based distribution, as root type :
<pre>apt-get -y install build-essential</pre>
Here is how to enabled php’s apc on a CentOS VPS:
1. yum -y install php-pear pcre-devel php-pear php-devel httpd-devel gcc
2. pecl install apc (press enter to accept the default response for each option)
3. echo “extension=apc.so” > /etc/php.d/apc.ini
4. service httpd restart
5. cp /usr/share/pear/apc.php /home/YOUR_USER_NAME/www/some_private_file_name.php
The apc.php page can be loaded to view the cache status. We recommend you rename it to something other than apc.php
CentOS 4 is no longer supported by the developers and we do not recommend you install it. If you have a special case which requires CentOS 4, you will find that yum will not update or perform installs because the repository URL’s are no longer valid.
To make yum work with vault.centos.org, edit your :
to have these lines:
name=CentOS-$releasever - Base
name=CentOS-$releasever - Updates
yum update, yum install, etc. will now work.
Question: Webmin keeps crashing on my VPS. Why does this happen and how can I fix it?
From our experience, webmin seems to become non-responsive when running on “low memory” VPS’s (typically those with 256 megs of ram or less).
If you attempt to connect to webmin (port 10000 by default) and get an unable to connect message, do the following:
1. ssh in to your server
2. as root, type :
/sbin/service webmin restart
Note, that “service” will restart webmin on a RedHat/Centos based VPS. If you are running a different Linux flavor you’ll need to use the service management for that distribution.
You should also make sure webmin is set to start automatically on reboots by running:
/sbin/chkconfig webmin on
I tried to connected to webmin on my VPS today and got the error :
Firefox can’t establish a connection to the server at 100.100.100.100:10000.
(where 100.100.100.100 is the IP of your VPS)
What is wrong?
This means webmin has crashed and is a warning sign that you are likely using more memory than your VPS has installed. On VPS’s with low memory, webmin seems to be one of the first things to lock up.
You can restart it by ssh’ing to the server and typing:
/sbin/service restart webmin
You could also reboot the entire VPS in your control panel as last resort if you do not have ssh access from your current location.
If you would like to purchase more memory contact support. Memory upgrades are quick and do not require any downtime to your VPS>
No matter what I do, my VPS returns “fork: Cannot allocate memory”. What is happening?
“fork: Cannot allocate memory” means that you have locked up the VPS by allocating too much memory (and thereby no memory is left to start (ie. fork) any new processes). You can try to kill -9 processes that are running but many times you need to reboot the VPS from the control panel.
The php version on my VPS is out of date. How do I update it?
Using the OS vendors normal update command can get you some updates (but perhaps not what you want – see below). For example on RedHat/CentOS run:
yum update php
However usually the OS vendors versions are not the latest. The update them to patch security issues but many times are far out of date from what you may require.
To update RedHat/CentOS to a newer php run these commands:
yum erase php-pdo php-xml php-mysql php php-common php-cli php-gd php-mbstring php-devel
yum install php53-pdo php53-xml php53-mysql php53 php53-common php53-cli php53-gd php53-mbstring
/sbin/service httpd restart
These are “unofficial” RPM’s as RedHat only official supports a particular (semi-old) version and backports security fixes to it – good for large corporate users but not so great for active developers). However the RPMS’s above are widely used in the community and most developers view them as trustworthy (just important to note that they are not actually from RedHat).
Webmin often crashes or locks up if you run out of RAM.
You can restart webmin by ssh’ing to your VPS and running the following command :
/sbin/service webmin restart