0

When I type in localhost it is loading the webapp without database information.

No errors showing in apache2 error log. Ran info.php to test php, and it loaded.

Created user in phpmyadmin and connection from workbench tested ok, and was able to forward engineer the database.

What is wrong? and how to identify the problem?

Here's what I tried so far (I'm newbie to the extreme):

sudo netstat -plunt | grep apache2

Tried that to check apache server, got this:

tcp6       0      0 :::80                   :::*                    LISTEN      2808/apache2 

Then I typed this:

mysql -u root -p

And got this:

Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.14 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

I also tried to see if the databases are showing:

show databases;

And I see a list including the database I want.

I dug into the syslog in var/log/syslog, and I found this:

Sep  2 20:48:01 name mysqld[12007]: 2016-09-03T03:48:01.270840Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
Sep  2 20:48:01 name mysqld[12007]: 2016-09-03T03:48:01.270934Z 0 [Note] IPv6 is available.
Sep  2 20:48:01 name mysqld[12007]: 2016-09-03T03:48:01.270951Z 0 [Note]   - '::' resolves to '::';
Sep  2 20:48:01 name mysqld[12007]: 2016-09-03T03:48:01.271052Z 0 [Note] Server socket created on IP: '::'.

Is there something wrong there with mysql?

Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43
ahmon
  • 1
  • 1
  • Could you post any code you are using, any errors, and what commands you have attempted so far? – James Sep 01 '16 at 23:06
  • Added some codes and commands I attempted, but if you suspect that the server is running the website but missing the database information, where to look logically? – ahmon Sep 02 '16 at 00:00
  • Which webapp are you using? Does the data look okay when connecting from phpMyAdmin and MySQL Workbench? – Isaac Bennetch Sep 03 '16 at 14:23
  • An webapp build by a friend. Long story short I'm trying to setup a local server on my computer with lamp for web development. When I open workbench I see the database/schema and I was able to forward engineer. When I type localhost in the brower the website loads (ie layout) but without data. – ahmon Sep 03 '16 at 18:50
  • It definitely sounds like there's a problem with the webapp connecting to the database; if there aren't any errors shown or logged by the webapp (try the PHP and webserver error logs as well), then you'll have to either ask your friend for help or add some debugging code to the webapp to figure out what's wrong. Since it's a custom app and it isn't showing you an error message, I doubt there's anything any of us know about fixing it. – Isaac Bennetch Sep 05 '16 at 14:33

0 Answers0