I am in the process of setting up a Moodle server, and I have managed to screw up the installation of MySQL.
The environment is as follows:
CentOS 5.3
Apache 2.2
PHP 5.3
MySQL 5.1
For the most part everything was working, except that on one forum I had read that for security reasons I should create a new MySQL admin user with all privileges, and then drop the root user. So I did this. But then the new user didn't seem to have global privileges. I could create a new user and a database of the same name, but I would get an error saying that access to the new database was denied to the admin user. So I decided to just take MySQL back to a fresh installation. I uninstalled MySQL ($sudo yum remove mysql), and then re-installed it. And now it is royally screwed. Nothing seems to work anymore.
The installation of MySQL completes without any errors. But when I try the following command:
$sudo /etc/init.d/mysqld start
I get the following error:
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
If I simply execute:
$mysql
I get this error:
mysql: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
When I try to check the version of PHP like so:
$php -v
I get the following errors:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysq
l.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysq
li.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_
mysql.so' - /usr/lib/php/modules/pdo_m
ysql.so: undefined symbol: mysql_get_server_version in Unknown on line 0
PHP 5.3.0 (cli) (built: Jul 19 2009 17:55:08)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
I installed phpMyAdmin, and when I try to connect to MySQL via phpMyAdmin I get this wrror:
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
I am going nuts trying to figure out if the problem is with MySQL or PHP or what. I have spent many hours trawling through forums and blogs trying to find something which will lead me in the right direction, but so far I have had no success.
Please note - my Linux skills are very rudimentary; I am gradually becoming more comfortable with server admin via a terminal window, but there is much I don't know. I say this because I don't want Experts to assume I have a high level of knowledge regarding administering a Linux server.
Cheers,
Paul