View Full Version : Mysql server could not be reached
Danielss89
10th January 2007, 16:03
Hi, when i get to the point where i should write the mysql server i type localhost... i get "The mysql server could not be reached"... what should i do...
in my /etc/hosts are the following:
127.0.0.1 localhost localhost.localdomain
89.186.169.112 pottersiden.dk danielss89
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Is something missing?
//danielss89
mphayesuk
10th January 2007, 16:09
Mine looks like this see if it makes a difference:
server1:/etc # vi hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#
127.0.0.1 localhost.localdomain localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
212.xxx.xxx.xxx xxx.domainxxx.co.uk server1
212.xxx.xxx.xxx xxx.domainxxx.co.uk
Danielss89
10th January 2007, 16:21
hmm it doesnt seem to work, should i restart enything after editing the file??
im still in the install, should i try to exit the install and do it over? or does it matter!!
mphayesuk
10th January 2007, 16:27
change the host files and then restart your server and then re-run the install and see what happens.
Danielss89
10th January 2007, 16:42
Hmm.. i tried reinstall.. and now i get this:
fileio.o: In function `tempname':
fileio.c:(.text+0x396): warning: the use of `mktemp' is dangerous, better use `mkstemp'
make[1]: Leaving directory `/install_ispconfig/compile_aps/zip-2.3'
cc -o unzip unzip.o crc32.o crctab.o crypt.o envargs.o explode.o extract.o fileio.o globals.o inflate.o list.o match.o process.o ttyio.o unreduce.o unshrink.o zipinfo.o unix.o -s
mv: cannot stat `binaries/ispconfig_tcpserver': No such file or directory
All prerequisites are fulfilled.
Here we go...
Warning: include(config.inc.php): failed to open stream: No such file or directory in /install_ispconfig/install.php on line 665
Warning: include(): Failed opening 'config.inc.php' for inclusion (include_path='.:') in /install_ispconfig/install.php on line 665
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /install_ispconfig/install.php on line 685
Could not connect to db
Restarting some services...
apache2: apr_sockaddr_info_get() failed for danielss89
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Stopping ftp server: proftpd.
Starting ftp server: proftpd - IPv4 getaddrinfo 'danielss89' error: Name or service not known
- warning: unable to determine IP address of 'danielss89'
- error: no valid servers configured
- Fatal: error processing configuration file '/etc/proftpd/proftpd.conf'
failed!
./setup2: line 1133: /etc/init.d/ispconfig_server: No such file or directory
Congratulations! Your ISPConfig system is now installed. If you had to install quota, please take the steps described in the installation manual. Otherwise your system is now available without reboot.
but i tried http://domain.tld:81
it just say page cannot be displayed
:/
what to do now:(
mphayesuk
10th January 2007, 16:50
you cant get to the page because the install failed. The warnings at the top dont worry about. But the problem is that the password you specified for mysql access is wrong
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /install_ispconfig/install.php on line 685
Could not connect to db
If you already have ispc installed and your updateing it you need to use the mysql password you specified during the initial install.
If this is a first install you need to specify a password with your mysql credentials.
If you are reinstalling make sure you delete the old install folders as described in other threads.
Hope this helps
Danielss89
10th January 2007, 17:19
DAmnit... it still doesnt work..
i triyed delete all ispc files, and restart install... i still get the mysql server not reachable error...
my hosts file look's like this:
127.0.0.1 localhost localhost.localdomain
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
89.186.169.112 www.potterskolen.dk potterskolen
89.186.169.112 http://potterskolen.dk potterskolen
89.186.169.112 localhost localhost.localdomain
mphayesuk
10th January 2007, 17:51
lets check its running netstat -tap and post the results.
Danielss89
10th January 2007, 17:56
root@danielss89:/# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost:mysql *:* LISTEN 14267/mysqld
tcp 0 0 localhost:www *:* LISTEN 18423/apache2
tcp 0 0 localhost:webmin *:* LISTEN 13785/perl
tcp 0 0 localhost:domain *:* LISTEN 29490/named
tcp 0 0 localhost:ssh *:* LISTEN 18302/sshd
tcp 0 0 localhost:smtp *:* LISTEN 26733/exim4
tcp 0 0 localhost:www port108.ds1-gl.ad:11795 TIME_WAIT -
tcp 0 0 localhost:www cpe.atm2-0-72278.0:1696 TIME_WAIT -
tcp 0 0 localhost:www cpe.atm2-0-72278.0:1698 ESTABLISHED890/apache2
tcp 0 0 localhost:www cpe.atm2-0-72278.0:1699 ESTABLISHED972/apache2
tcp 0 0 localhost:www 0x50a47334.odnxx4:52127 TIME_WAIT -
tcp 0 0 localhost:www 0x50a47334.odnxx4:52128 TIME_WAIT -
tcp 0 0 localhost:www 0x50a5be7b.sgnxx1:62247 TIME_WAIT -
tcp 0 0 localhost:www 0x50a5be7b.sgnxx1:62246 TIME_WAIT -
tcp 0 0 localhost:www 0x50c409be.bynxx8.:1847 ESTABLISHED1038/apache2
tcp 0 0 localhost:www 0x50c409be.bynxx8.:1848 ESTABLISHED957/apache2
tcp 0 0 localhost:www cpe.atm2-0-72278.0:1694 TIME_WAIT -
tcp 0 0 localhost:www cpe.atm2-0-72278.0:1689 TIME_WAIT -
tcp 0 0 localhost:www 0x50a47334.odnxx4:52141 FIN_WAIT2 -
tcp 0 0 localhost:www 0x50a47334.odnxx4:52146 FIN_WAIT2 -
tcp 0 0 localhost:www 87.104.48.7:65283 FIN_WAIT2 -
tcp 0 0 localhost:www d40a710e.rev.stofa:3446 TIME_WAIT -
tcp 0 0 localhost:www d40a710e.rev.stofa:3442 TIME_WAIT -
tcp 0 0 localhost:www 0x535c1542.odnxx9.:3598 ESTABLISHED881/apache2
tcp 0 0 localhost:www 0x535c1542.odnxx9.:3599 ESTABLISHED943/apache2
tcp 0 0 localhost:www 87.104.48.7:65197 FIN_WAIT2 -
tcp 0 0 localhost:www x1-6-00-0c-e5-c0-1:1909 ESTABLISHED935/apache2
tcp 0 0 localhost:www x1-6-00-0c-e5-c0-1:1908 ESTABLISHED898/apache2
tcp 0 0 localhost:www 0x5733daa7.bynxx1:13696 ESTABLISHED889/apache2
tcp 0 0 localhost:www 87.104.48.7:65171 FIN_WAIT2 -
tcp 0 0 localhost:www 0x57327b62.kjnxx8:64498 TIME_WAIT -
tcp 0 0 localhost:www port124.ds1-md.ad:12281 TIME_WAIT -
tcp 0 0 localhost:www port124.ds1-md.ad:12282 TIME_WAIT -
tcp 0 0 localhost:www port124.ds1-md.ad:12278 TIME_WAIT -
tcp 0 0 localhost:www port124.ds1-md.ad:12279 TIME_WAIT -
tcp 0 0 localhost:www 0x535dac0d.arcnxx1:3959 ESTABLISHED933/apache2
tcp 0 0 localhost:www 0x535dac0d.arcnxx1:3957 ESTABLISHED975/apache2
tcp 0 0 localhost:www 0x535dac0d.arcnxx1:3949 TIME_WAIT -
tcp 0 0 localhost:www d40a710e.rev.stofa:3566 TIME_WAIT -
tcp 0 0 localhost:www d40a710e.rev.stofa:3564 TIME_WAIT -
tcp 0 0 localhost:www 5634fc02.rev.stof:14507 ESTABLISHED885/apache2
tcp 0 0 localhost:www 0x5735cfb5.hinxx4:49957 ESTABLISHED1236/apache2
tcp 0 0 localhost:www 0x5735cfb5.hinxx4:49959 ESTABLISHED1034/apache2
tcp 0 0 localhost:www x1-6-00-04-76-dd-b:1689 ESTABLISHED985/apache2
tcp 0 0 localhost:www x1-6-00-04-76-dd-b:1690 ESTABLISHED1238/apache2
tcp 0 0 localhost:ssh 0x503e3ddd.hknxx1:23469 ESTABLISHED23759/sshd: daniels
tcp 0 0 localhost:www 0x535ea543.aaanxx1:4347 FIN_WAIT2 -
tcp 0 0 localhost:www 0x535ea543.aaanxx1:4349 FIN_WAIT2 -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2451 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2452 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2442 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2441 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2434 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2435 TIME_WAIT -
tcp 0 0 localhost:www 0x535b6292.naenxx:27634 TIME_WAIT -
tcp 0 0 localhost:www 0x535ea543.aaanxx1:4327 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2436 TIME_WAIT -
tcp 0 0 localhost:www 195.249.106.2:40880 ESTABLISHED963/apache2
tcp 0 0 localhost:www 195.249.106.2:40884 ESTABLISHED896/apache2
tcp 0 0 localhost:www 194.182.168.210:1766 ESTABLISHED1250/apache2
tcp 0 0 localhost:www 194.182.168.210:1765 ESTABLISHED1033/apache2
tcp 0 0 localhost:www 50C57F8D.flatrate:22064 FIN_WAIT2 -
tcp 0 0 localhost:www 0x5733f1e7.vgnxx6.:1580 TIME_WAIT -
tcp 0 0 localhost:www 5634fc02.rev.stof:14534 ESTABLISHED15292/apache2
tcp 0 0 localhost:www 0x5733f1e7.vgnxx6.:1591 ESTABLISHED15261/apache2
tcp 0 0 localhost:www 0x5733f1e7.vgnxx6.:1598 ESTABLISHED934/apache2
tcp 0 0 localhost:www 0x5733f1e7.vgnxx6.:1592 ESTABLISHED1249/apache2
tcp 0 0 localhost:www 217.60.118.194:1899 FIN_WAIT2 -
tcp 0 0 localhost:www 0x535c1c2c.bynxx1:26765 FIN_WAIT2 1247/apache2
tcp 0 0 localhost:www 0x535c1c2c.bynxx1:26509 ESTABLISHED884/apache2
tcp 0 0 localhost:www 217.60.118.194:1900 FIN_WAIT2 -
tcp 0 0 localhost:www 0x50a07c1e.naenxx7:1329 TIME_WAIT -
tcp 0 0 localhost:www 0x50a07c1e.naenxx7:1328 TIME_WAIT -
tcp 0 0 localhost:www 0x50a07c1e.naenxx7:1331 ESTABLISHED15201/apache2
tcp 0 0 localhost:ssh 0x503e3ddd.hknxx1:25129 ESTABLISHED30746/sshd: daniels
tcp 0 0 localhost:www 0x50a07c1e.naenxx7:1332 ESTABLISHED928/apache2
tcp 0 2368 localhost:ssh 0x503e3ddd.hknxx1:26149 ESTABLISHED13928/sshd: daniels
tcp 0 0 localhost:www 0x555300be.adsl.c:22591 TIME_WAIT -
tcp 0 0 localhost:www 3e6bb640.rev.stofa:1860 ESTABLISHED962/apache2
tcp 0 0 localhost:www 3e6bb640.rev.stofa:1859 ESTABLISHED15263/apache2
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2427 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2424 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2425 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2418 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2419 TIME_WAIT -
tcp 0 0 localhost:www 0x555300be.adsl.c:22593 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2411 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2412 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2413 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2392 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2398 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2397 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2390 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2391 TIME_WAIT -
tcp 0 5644 localhost:www x1-6-00-16-36-2f-f:2277 ESTABLISHED1239/apache2
tcp 0 0 localhost:www 83.95.177.115:1548 TIME_WAIT -
tcp 0 0 localhost:ssh 0x503e3ddd.hknxx1:26185 ESTABLISHED13941/sshd: daniels
tcp 0 0 localhost:www x1-6-00-16-36-2f-f:2272 ESTABLISHED901/apache2
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2380 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2381 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2371 TIME_WAIT -
tcp 0 0 localhost:www 0x5552b496.adsl.c:29162 TIME_WAIT -
tcp 0 0 localhost:www 0x535b6292.naenxx:27698 ESTABLISHED15285/apache2
tcp 0 0 localhost:www 0x5552b496.adsl.c:29161 TIME_WAIT -
tcp 0 0 localhost:www 0x5731c820.svgnxx4:2372 TIME_WAIT -
tcp 0 0 localhost:www 0x535b6292.naenxx:27703 ESTABLISHED1035/apache2
mphayesuk
10th January 2007, 18:00
Ok everything looks fine with that, can you connect to the database manually from the command prompt.
try:
mysql -u root -p
and then enter the password.
see what happens
Danielss89
10th January 2007, 18:02
yes i can connect
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 55920
Server version: 5.0.30-Debian_3-log Debian etch distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
mphayesuk
10th January 2007, 18:05
I hate to say this but I am running out of ideas, as far as everything looks it should work, sql is working and you can connect, perhaps one of the big wigs and shed some light on this.
Danielss89
10th January 2007, 18:11
i read in another thread that he had the same problem but that the problem was with ipchains or iptables, but he didnt write what was wrong
.. could it be something like that??
mphayesuk
10th January 2007, 18:13
I'm not sure, I cant see the link between iptables/chains and the mysql database access.
mlz
10th January 2007, 18:21
What Mysql hostname are you entering when you install? Is it localhost or the name of the machine?
If you use the name of the machine, you should use the -h hostname param when connecting to test. If your using localhost then you should be good to connect through the socket.
Danielss89
10th January 2007, 18:23
What Mysql hostname are you entering when you install? Is it localhost or the name of the machine?
If you use the name of the machine, you should use the -h hostname param when connecting to test. If your using localhost then you should be good to connect through the socket.
can you explain excactly what i should do, when i install ispc i type localhost and then i get the mysql server not reachable
Danielss89
10th January 2007, 18:59
ive finally got it to work, and isp config works very well.. now my problem is just that my domains that i had before wont do php anymore, it just print the file take a look at this:
http://potterskolen.dk/user/
user: dpn
pass: dpn
mlz
10th January 2007, 22:47
In the vhost definitions of the old sites, turn on the handler for PHP. Part of the install you disable it for ISPConfig, so you should be able to add it in for the old sites that are not managed by ISPConfig. I believe the line to add is:
AddType application/x-httpd-php .php .php3 .php4 .php5
Danielss89
10th January 2007, 22:50
yes it is.. thanks you..
hehe now my only problem is that pop3 is offline no matter what i do:D
till
11th January 2007, 09:25
Is it really offline or does it just show offline in ISPConfig?
Please post the output of:
netstat -tap
Which pop3 daemon do you use, courier, dovecot or another daemon?
Roger Huston
17th January 2007, 08:53
ive finally got it to work, and isp config works very well..
Can you let me know what you did to get this to work. I am having the same problem and I can connect via the database using "mysql -u root -p"
- Roger
Roger Huston
17th January 2007, 19:37
I figured it out. During my installation I used some !@# characters in my MySQL password. While it allows me to login using mysql - u root -p and typing the password in the line, when used in scripts I get a command line substitution that will break the script.
This is easy to see, when you enter your mysql password on the command line using mysql -u root -pZAQ!2wsx for example. Hit the up arrow to see if the password is the same in your history. If not, you have a problem.
Once I was able to change the root password using [A-Z][a-z][0-9] characters only, the install went perfectly.
-Roger
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.