I installed the MySQL binary packages in /usr/local/mysql/ after removing the MySQL RPM package. MySQL is functioning when I executed /usr/local/mysql/bin/safe_mysqld. I reinstalled MySQL before I installed PHP. When I used a PHP script to access a MySQL database, it outputs an error:
Code: Warning: mysqli::mysqli() [function.mysqli-mysqli]: (HY000/2002): can't connect to local mysql server through socket /var/lib/mysql/mysql.sock in index.php on line 2 However, I installed MySQL in /usr/local/mysql, not in /var/lib/mysql. How do I fix MySQL?
i am running a VPS and recently installed cPanel DNS Only so it can operate as a standalone DNS server.
I would also like to serve standard webpages on it via apache and php, i therefore tired to install php, mysql etc via 'yum install php' but it says there is no package to be installed.
Has the cPanel DNS only install done someting to the yum config? I have installed Yum Priorities plugin, and my repos files are as follows:
Code: root@stripe [~]# yum list installed | grep httpd httpd.i386 2.2.3-22.el5.centos.1 installed root@stripe [~]# yum list installed | grep php*
root@stripe [~]# cat /etc/yum.repos.d/CentOS-Base.repo # CentOS-Base.repo # # This file uses a new mirrorlist system developed by Lance Davis for CentOS. # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # #
[base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 priority=1
#packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 priority=1
is there a way to copy mysql from an existing db, and then renaming it to another name?
I would like to copy my current db from a live forum site, and because I got a test forum but I need that test forum to use my current live db...but i want it to use a copy of the live db. The db has to be a different name for the test site. Sorry hard for me to explain.
Is there an easy way to do that? I would do it via cpanel backup and upload but the db is 2gb's gzip....
A few weeks ago I installed clamav using the cPanel "Manage Plug-Ins". It all seemed fine but my server load kept going ridiculously high. I couldn't work out what was wrong until I managed to get a ps aux when it was very high and found that clamd was using ridiculous amounts of memory/cpu. It's not such a big deal having it on my server, so I decide to uninstall it. After uninstalling it, MySQL started to randomly turn off regularly (around every 30 minutes). I tried forcing a cPanel update, updating the MySQL files, reinstalling MySQL, etc. but nothing has seemed to fix it. So as a last resort, I've reinstalled Clamav and now my MySQL is fine but my server load keeps going ridiculously high again; causing problems still.
Has anyone/cPanel ever experienced this problem? I need to find a solution as almost every account on my server uses MySQL as a basis for their website, so I can't have it going down even for less than a minute.
I would like to start offering MySQL 5 on all my shared hosting accounts, seeing how it's an increasingly requested feature. However, by my understanding most applications still require MySQL 4 to operate (am particularly concerned with those bundled with Fantastico). I would like my current clients to be able to continue working with these older apps using MySQL 4 while allowing new clients to make use of the latest features available with MySQL 5.
I would like to get people's opinions as to what the best approach would be here. Should I upgrade directly to MySQL 5, offer both versions 4 and 5 simultaneously, or just stick to version 4 until version 5 is better supported? If I choose to install both versions in parallel, is this an easily supported option with CPanel/WHM? Will the configuration change break anything for clients already using applications with MySQL 4?
I have a Cpanel server with a problem: SQL keeps failing
Everytime I try to restart MySQL via WHM, it gives me:
/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "mysql has failed").
I can only restart it successfully after 2nd attempt. Server load is always low. Memory usage is also low.
It happens in very short interval (in less than every 1-10 minutes)
It never happens until recently when my server management company tweak something I didn't know. They said fixed it and then it happens again every minutes.
I have 9 servers and it never happens to the rest 8 servers. Just this server always happening.
On a cPanel server, running RHEL 4 I got the following error (from cpanel logs) while associating an user with a DB from the cPanel admin:
Fri Apr 11 17:02:47 2008 info [Cpanel::Mysql]: Not updating privileges for user (reseller login and no password specified in ~/.my.cnf) at /usr/local/cpanel/Cpanel/Mysql.pm line 268 Cpanel::Mysql::updateprivs('Cpanel::Mysql=HASH(0xa4a8768)') called at /usr/local/cpanel/bin/mysqladmin line 88 Fri Apr 11 17:02:47 2008 info [Cpanel::Mysql]: Not updating privileges for user (reseller login and no password specified in ~/.my.cnf) at /usr/local/cpanel/Cpanel/Mysql.pm line 268
In fact, from cPanel interface all privileges are added OK, but the MySQL itself is not connecting at all due to this error.
After the installation, one problem is that Mysql doesn't have some international character sets /collation included such as Big5, gbk, ujis which are mostly for Asian language.Is this normal for Cpanel installation? I got a response from Cpanel stating this is a default setting for Mysql. Because we have lots Asian customers, it there any way can include new international character set /collation without reinstalling Cpanel?