Cannot connect to MySQL server on 'localhost'.
Moderators: Developers, Moderators
Cannot connect to MySQL server on 'localhost'.
Hi,
I have edited config.php file in c:\inetpub\wwwroot\cacti\include\config.php location to specify MySQL user, password and database.(Below are the changes);
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipw";
$database_port = "3306";
$database_ssl = false;
As I proceeded with the guidelines to ponit my web browser to http://localhost/cacti/ I encountered below error:
FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php' PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_oci8.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_oci8_11g.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_pdo_oci.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_sybase_ct.dll' - The specified module could not be found. in Unknown on line 0 No log handling enabled - turning on stderr logging Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none) Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none) Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none) Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module (SNMP-MPD-MIB): At line 0 in (none) Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module (SNMPv2-TM): At line 0 in (none)
Currently I am looking to fix the connectivity failure to Mysql server later I can look into other errors.Please help we on how I can resolve this issue as I am new this setup.Please let me know if you need more info to help me out with this issue.
I did the setup in windows XP machine.
Regards,
Wasim
I have edited config.php file in c:\inetpub\wwwroot\cacti\include\config.php location to specify MySQL user, password and database.(Below are the changes);
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipw";
$database_port = "3306";
$database_ssl = false;
As I proceeded with the guidelines to ponit my web browser to http://localhost/cacti/ I encountered below error:
FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php' PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_oci8.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_oci8_11g.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_pdo_oci.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_sybase_ct.dll' - The specified module could not be found. in Unknown on line 0 No log handling enabled - turning on stderr logging Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none) Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none) Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none) Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module (SNMP-MPD-MIB): At line 0 in (none) Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module (SNMPv2-TM): At line 0 in (none)
Currently I am looking to fix the connectivity failure to Mysql server later I can look into other errors.Please help we on how I can resolve this issue as I am new this setup.Please let me know if you need more info to help me out with this issue.
I did the setup in windows XP machine.
Regards,
Wasim
Re: Cannot connect to MySQL server on 'localhost'.
1) is there a reason why you have all those extra extensions enabled in php? If you dont need it, disable it. Especially those throwing errors.
2) the mib errors are ignorable.
3) is mysql service running? are you able to login to it via the commandline?
2) the mib errors are ignorable.
3) is mysql service running? are you able to login to it via the commandline?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: Cannot connect to MySQL server on 'localhost'.
Hi,
Yes,mysql server is running in my machine and I am able to login to it via command line.
Below are the s/w versions that are currently installed in my machine .
Operating System:Windows XP,SP3
Webserver:IIS 5.1
Cacti:0.8.8a
Spine:0.8.8a-win32
MySQL:5.5.24
PHP:5.3.13
RRDTool (Cygwin or Win32 build):1.2.15-cygwin-1.5.20
Net-SNMP:5.6.1.1
Cygwin (cygwin1.dll version):CYGWIN_NT-5.1 (DLL version 1.7.15)
Yes,mysql server is running in my machine and I am able to login to it via command line.
Below are the s/w versions that are currently installed in my machine .
Operating System:Windows XP,SP3
Webserver:IIS 5.1
Cacti:0.8.8a
Spine:0.8.8a-win32
MySQL:5.5.24
PHP:5.3.13
RRDTool (Cygwin or Win32 build):1.2.15-cygwin-1.5.20
Net-SNMP:5.6.1.1
Cygwin (cygwin1.dll version):CYGWIN_NT-5.1 (DLL version 1.7.15)
Re: Cannot connect to MySQL server on 'localhost'.
How did you install Cacti? It would appear the cacti user account in mysql needs to be recreated.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: Cannot connect to MySQL server on 'localhost'.
I have followed the steps provided in below URL to install Cacti.
http://bsod2600.home.comcast.net/~bsod2 ... ndows.html
The step says:
Recommended Install Path: C:\Inetpub\wwwroot\cacti\
Extract the cacti zip file to the root of your web server directory. This will be c:\inetpub\wwwroot if you are using the default installation of IIS. The extracted directory will be called cacti-0.8.7e. Rename it to cacti.
I also followed the steps to create cacti DB and its mysql username and password.
What you want me to do to resolve this issue?
http://bsod2600.home.comcast.net/~bsod2 ... ndows.html
The step says:
Recommended Install Path: C:\Inetpub\wwwroot\cacti\
Extract the cacti zip file to the root of your web server directory. This will be c:\inetpub\wwwroot if you are using the default installation of IIS. The extracted directory will be called cacti-0.8.7e. Rename it to cacti.
I also followed the steps to create cacti DB and its mysql username and password.
What you want me to do to resolve this issue?
Re: Cannot connect to MySQL server on 'localhost'.
Are you able to login to MySQL with the cacti credentials? If not, re-do the mysql user account creation steps.
Any errors in the mysql error log?
Any errors in the mysql error log?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: Cannot connect to MySQL server on 'localhost'.
Yes,I am able to login to mysql 'cacti' DB using cacti credentials.
Below is the command I executed and was able to login using password created for cacti DB.
mysql -u cactiuser -p cacti
Do I need to try something else ? I don't see any error log,where can I see this ?
Below is the command I executed and was able to login using password created for cacti DB.
mysql -u cactiuser -p cacti
Do I need to try something else ? I don't see any error log,where can I see this ?
Re: Cannot connect to MySQL server on 'localhost'.
Put those credentials in config.php.Wasim wrote:Yes,I am able to login to mysql 'cacti' DB using cacti credentials.
C:\Users\All Users\MySQL\<MySQL version>\data\<servername>.errWasim wrote:I don't see any error log,where can I see this ?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: Cannot connect to MySQL server on 'localhost'.
Those credentials are already copied to config.php file.
Re: Cannot connect to MySQL server on 'localhost'.
running: php -m at the command prompt still throw any errors? Ignoring the MIB related ones, they need to be fixed.
Restarted the server since making all the changes?
Restarted the server since making all the changes?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: Cannot connect to MySQL server on 'localhost'.
Below is the output of php -m command.Most of them are related to MIB,which according to you cna be ignored.Do you see any changes to be made to php.ini file based on this output to fix this issue?
No log handling enabled - turning on stderr logging
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
[PHP Modules]
bcmath
bz2
calendar
com_dotnet
Core
ctype
curl
date
dom
enchant
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
json
ldap
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
odbc
openssl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
SQLite
sqlite3
standard
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
No log handling enabled - turning on stderr logging
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
[PHP Modules]
bcmath
bz2
calendar
com_dotnet
Core
ctype
curl
date
dom
enchant
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
json
ldap
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
odbc
openssl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
SQLite
sqlite3
standard
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
Re: Cannot connect to MySQL server on 'localhost'.
Hi,
Could anyone please assist how I can move ahead now ? I am stuck here and not able to do any progress.
Could anyone please assist how I can move ahead now ? I am stuck here and not able to do any progress.
Re: Cannot connect to MySQL server on 'localhost'.
Hi,
Finally,I was able to install cacti.It worked after I changed user name to "root" and corresponding root "password".
But now I am not able to see the graphs getting generated.Any idea what could be the issue ?
Finally,I was able to install cacti.It worked after I changed user name to "root" and corresponding root "password".
But now I am not able to see the graphs getting generated.Any idea what could be the issue ?
Re: Cannot connect to MySQL server on 'localhost'.
You should NOT be running cacti under the root account. big security hole.Wasim wrote:Finally,I was able to install cacti.It worked after I changed user name to "root" and corresponding root "password".
read/followed http://forums.cacti.net/viewtopic.php?f=3&t=11747 yet?Wasim wrote:But now I am not able to see the graphs getting generated.Any idea what could be the issue ?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: Cannot connect to MySQL server on 'localhost'.
As the cacti is already installed,what I need to do in order to run it under another user account?
Who is online
Users browsing this forum: No registered users and 2 guests