![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
On Jan 18, 12:42 pm, The Natural Philosopher <t... (AT) invalid (DOT) invalid wrote: cerr wrote: On Jan 17, 12:24 pm, cerr <ron.egg... (AT) gmail (DOT) com> wrote: On Jan 17, 12:09 pm, Luuk <L... (AT) invalid (DOT) lan> wrote: On 17-01-2012 18:56, cerr wrote: Hi, I have a LAMP installation. I can properly access my db from the shell but am not able to get in via apache, with phpmyadmin or Joomla e.g. Any clues? I'm pretty muich stuck, I tried configuring stuff around, root@localhost with password works just fine on the shell.... but i'm notable to use that user to login with either, phpmyadmin nor joomla. Any hints? Heklp would be appreciated! Thanks alot! Ron What is the output of: netstat -antp | grep 3306 It should show something like: tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN - Yep, I got root@reg-desktop:~# netstat -antp | grep 3306 tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 13136/mysqld which means MySQL is listening on port 3306 to receive requests. After that, write a PHP-page (i.e. phpinfo.php)like this: ?php phpinfo(); ? It should give you all kinds of info about your system. There is some info about how ( and if) PHP can contact MySQL for an example of the output you should get:http://example.com.customers.tigertech.net/phpinfo.php (scroll down to see the 'mysql' info....) My output looks a little different: MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $ Directive Local Value Master Value mysql.allow_local_infile On On mysql.allow_persistent On On mysql.connect_timeout 60 60 mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket /opt/lampp/var/mysql/mysql.sock /opt/lampp/var/ mysql/mysql.sock mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off No one here that can help me? ![]() I would GUESS that your default installation wont connecte except by either the unix socket /opt/lampp/var/mysql/mysql.sock or on the loopback interface 127.0.0.1 I found when setting up my own system that the c library API didnt like 'localhost' but was happy with '127.0.0.1' I'll see what my.conf says ... [client] port = 3306 socket = /var/run/mysqld/mysqld.sock # Here is entries for some specific programs # The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] # # * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language = /usr/share/mysql/english skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address = 127.0.0.1 Yep, I have tried with 127.0.0.1 and localhost and then read that when it's commented out, it'll just take your current IP. And taht's what I ended up doing, but just to try again, I set it back to 127.0.0.1 now, triggered a "/etc/init.d/mysql restart" but still no change... Now that will accept connections on both the .sock unix socket and 127.0.0.1:3306 It may be that one or other of the programs is expecting that to be active, and it isn't edit the file /etc/mysql/my.cnf and restart mysqld.. That's a bummer! I can't believe it!!!! Why is this? How what elsecould be messed up, maybe my MySQLi installation...? How could I get this fixed...? You HAVE got the mysql extensions to php installed? |
#12
| |||
| |||
|
|
cerr wrote: On Jan 18, 12:42 pm, The Natural Philosopher <t... (AT) invalid (DOT) invalid wrote: cerr wrote: On Jan 17, 12:24 pm, cerr <ron.egg... (AT) gmail (DOT) com> wrote: On Jan 17, 12:09 pm, Luuk <L... (AT) invalid (DOT) lan> wrote: On 17-01-2012 18:56, cerr wrote: Hi, I have a LAMP installation. I can properly access my db from the shell but am not able to get in via apache, with phpmyadmin or Joomla e.g. Any clues? I'm pretty muich stuck, I tried configuring stuff around, root@localhost with password works just fine on the shell.... but i'm notable to use that user to login with either, phpmyadmin nor joomla. Any hints? Heklp would be appreciated! Thanks alot! Ron What is the output of: netstat -antp | grep 3306 It should show something like: tcp * * * *0 * * *0 0.0.0.0:3306 * * * * * *0.0.0.0:* LISTEN * * *- Yep, I got root@reg-desktop:~# netstat -antp | grep 3306 tcp * * * *0 * * *0 0.0.0.0:3306 * * * * * *0.0.0.0:* LISTEN * * *13136/mysqld which means MySQL is listening on port 3306 to receive requests. After that, write a PHP-page (i.e. phpinfo.php)like this: ?php * phpinfo(); ? It should give you all kinds of info about your system. There is some info about how ( and if) PHP can contact MySQL for an example of the output you should get:http://example.com.customers.tigertech.net/phpinfo.php (scroll down to see the 'mysql' info....) My output looks a little different: MySQL Support * *enabled Active Persistent Links *0 Active Links * * 0 Client API version * * * mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $ Directive * * * *Local Value * * Master Value mysql.allow_local_infile * * * * On * * *On mysql.allow_persistent * On * * *On mysql.connect_timeout * *60 * * *60 mysql.default_host * * *no value * * * *no value mysql.default_password *no value * * * *no value mysql.default_port * * *no value * * * *no value mysql.default_socket * * /opt/lampp/var/mysql/mysql.sock * ** * /opt/lampp/var/ mysql/mysql.sock mysql.default_user * * *no value * * * *no value mysql.max_links *Unlimited * * * Unlimited mysql.max_persistent * * Unlimited * * * Unlimited mysql.trace_mode * * * * Off * * Off No one here that can help me? ![]() I would GUESS that your default installation wont connecte except by either the unix socket /opt/lampp/var/mysql/mysql.sock or on the loopback interface 127.0.0.1 I found when setting up my own system that the c library API didnt like 'localhost' but was happy with '127.0.0.1' I'll see what my.conf says ... [client] port * * * * * *= 3306 socket * * * * *= /var/run/mysqld/mysqld.sock # Here is entries for some specific programs # The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket * * * * *= /var/run/mysqld/mysqld.sock nice * * * * * *= 0 [mysqld] # # * Basic Settings # user * * * * * *= mysql pid-file * * * *= /var/run/mysqld/mysqld.pid socket * * * * *= /var/run/mysqld/mysqld.sock port * * * * * *= 3306 basedir * * * * = /usr datadir * * * * = /var/lib/mysql tmpdir * * * * *= /tmp language * * * *= /usr/share/mysql/english skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address * * * * * *= 127.0.0.1 Yep, I have tried with 127.0.0.1 and localhost and then read that when it's commented out, it'll just take your current IP. And taht's what I ended up doing, but just to try again, I set it back to 127.0.0.1 now, triggered a "/etc/init.d/mysql restart" but still no change... Now that will accept connections on both the .sock unix socket and 127.0.0.1:3306 It may be that one or other of the programs is expecting that to be active, and it isn't edit the file /etc/mysql/my.cnf and restart mysqld.. That's a bummer! I can't believe it!!!! Why is this? How what elsecould be messed up, maybe my MySQLi installation...? How could I get this fixed...? You HAVE got the mysql extensions to php installed? what does phpinfo have to say.. |
#13
| |||
| |||
|
|
cerr wrote: On Jan 18, 12:42 pm, The Natural Philosopher <t... (AT) invalid (DOT) invalid wrote: cerr wrote: On Jan 17, 12:24 pm, cerr <ron.egg... (AT) gmail (DOT) com> wrote: On Jan 17, 12:09 pm, Luuk <L... (AT) invalid (DOT) lan> wrote: On 17-01-2012 18:56, cerr wrote: Hi, I have a LAMP installation. I can properly access my db from the shell but am not able to get in via apache, with phpmyadmin or Joomla e.g. Any clues? I'm pretty muich stuck, I tried configuring stuff around, root@localhost with password works just fine on the shell.... but i'm notable to use that user to login with either, phpmyadmin nor joomla. Any hints? Heklp would be appreciated! Thanks alot! Ron What is the output of: netstat -antp | grep 3306 It should show something like: tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN - Yep, I got root@reg-desktop:~# netstat -antp | grep 3306 tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 13136/mysqld which means MySQL is listening on port 3306 to receive requests. After that, write a PHP-page (i.e. phpinfo.php)like this: ?php phpinfo(); ? It should give you all kinds of info about your system. There is some info about how ( and if) PHP can contact MySQL for an example of the output you should get:http://example.com.customers.tigertech.net/phpinfo.php (scroll down to see the 'mysql' info....) My output looks a little different: MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $ Directive Local Value Master Value mysql.allow_local_infile On On mysql.allow_persistent On On mysql.connect_timeout 60 60 mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket /opt/lampp/var/mysql/mysql.sock /opt/lampp/var/ mysql/mysql.sock mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off No one here that can help me? ![]() I would GUESS that your default installation wont connecte except by either the unix socket /opt/lampp/var/mysql/mysql.sock or on the loopback interface 127.0.0.1 I found when setting up my own system that the c library API didnt like 'localhost' but was happy with '127.0.0.1' I'll see what my.conf says ... [client] port = 3306 socket = /var/run/mysqld/mysqld.sock # Here is entries for some specific programs # The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] # # * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language = /usr/share/mysql/english skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address = 127.0.0.1 Yep, I have tried with 127.0.0.1 and localhost and then read that when it's commented out, it'll just take your current IP. And taht's what I ended up doing, but just to try again, I set it back to 127.0.0.1 now, triggered a "/etc/init.d/mysql restart" but still no change... Now that will accept connections on both the .sock unix socket and 127.0.0.1:3306 It may be that one or other of the programs is expecting that to be active, and it isn't edit the file /etc/mysql/my.cnf and restart mysqld.. That's a bummer! I can't believe it!!!! Why is this? How what elsecould be messed up, maybe my MySQLi installation...? How could I get this fixed...? You HAVE got the mysql extensions to php installed? what does phpinfo have to say.. |
#14
| |||
| |||
|
|
On Jan 18, 12:42?pm, The Natural Philosopher <t... (AT) invalid (DOT) invalid wrote: cerr wrote: On Jan 17, 12:24 pm, cerr <ron.egg... (AT) gmail (DOT) com> wrote: On Jan 17, 12:09 pm, Luuk <L... (AT) invalid (DOT) lan> wrote: On 17-01-2012 18:56, cerr wrote: Hi, I have a LAMP installation. I can properly access my db from the shell but am not able to get in via apache, with phpmyadmin or Joomla e.g. Any clues? I'm pretty muich stuck, I tried configuring stuff around, root@localhost with password works just fine on the shell.... but i'm notable to use that user to login with either, phpmyadmin nor joomla. Any hints? Heklp would be appreciated! Thanks alot! Ron What is the output of: netstat -antp | grep 3306 It should show something like: tcp ? ? ? ?0 ? ? ?0 0.0.0.0:3306 ? ? ? ? ? ?0.0.0.0:* LISTEN ? ? ?- Yep, I got root@reg-desktop:~# netstat -antp | grep 3306 tcp ? ? ? ?0 ? ? ?0 0.0.0.0:3306 ? ? ? ? ? ?0.0.0.0:* LISTEN ? ? ?13136/mysqld which means MySQL is listening on port 3306 to receive requests. After that, write a PHP-page (i.e. phpinfo.php)like this: ?php ? phpinfo(); ? It should give you all kinds of info about your system. There is some info about how ( and if) PHP can contact MySQL for an example of the output you should get:http://example.com.customers.tigertech.net/phpinfo.php (scroll down to see the 'mysql' info....) My output looks a little different: MySQL Support ? ?enabled Active Persistent Links ?0 Active Links ? ? 0 Client API version ? ? ? mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $ Directive ? ? ? ?Local Value ? ? Master Value mysql.allow_local_infile ? ? ? ? On ? ? ?On mysql.allow_persistent ? On ? ? ?On mysql.connect_timeout ? ?60 ? ? ?60 mysql.default_host ? ? ?no value ? ? ? ?no value mysql.default_password ?no value ? ? ? ?no value mysql.default_port ? ? ?no value ? ? ? ?no value mysql.default_socket ? ? /opt/lampp/var/mysql/mysql.sock ? ? ? ? /opt/lampp/var/ mysql/mysql.sock mysql.default_user ? ? ?no value ? ? ? ?no value mysql.max_links ?Unlimited ? ? ? Unlimited |
|
user | host | +-----------+-------------------------+ root | 127.0.0.1 | root | localhost | root | nibelheim.ninehells.com | +-----------+-------------------------+ |
#15
| |||
| |||
|
|
On 18-01-2012 21:42, The Natural Philosopher wrote: I found when setting up my own system that the c library API didnt like 'localhost' but was happy with '127.0.0.1' because 'netstat -ant.....' said: 0.0.0.0:3306 mysql MUST be listening to more that just 'localhost', or '127.0.0.1' If it's just listenting to 'localhost' it would have said: 127.0.0.1:3306 |
#16
| |||
| |||
|
|
what does phpinfo have to say.. see http://24.82.166.99/phpinfo.php |
#17
| |||
| |||
|
|
Luuk <Luuk (AT) invalid (DOT) lan> wrote: On 18-01-2012 21:42, The Natural Philosopher wrote: I found when setting up my own system that the c library API didnt like 'localhost' but was happy with '127.0.0.1' because 'netstat -ant.....' said: 0.0.0.0:3306 mysql MUST be listening to more that just 'localhost', or '127.0.0.1' If it's just listenting to 'localhost' it would have said: 127.0.0.1:3306 Guys, please stop it! You sound like blind discussion colors. 'localhost' and '127.0.0.1' are completely different things for the |
|
MySQL server. This is by design and well documented: http://dev.mysql.com/doc/refman/5.1/en/connecting.html ' |
![]() |
| Thread Tools | |
| Display Modes | |
| |