This question already has an answer here:

First of all: I am a beginner, and have only basic knowledge about linux and servers. Also, this question is kind of vague, but i hope you can help. I would be very thankful for all kinds of feedback and guidance!

I'm running Ubuntu server 14.04 LTS on a very old PC. I want to be able to host a webpage. I am hosting the same page locally using my 2010 mac mini with MAMP, and that works very well. I needed to update my mysql login details when i transferred the project to the PC, and also imported the database. The problem is that when i try to view the page, it gets stuck at the point where it needs to access the db to find out wether or not the client is logged on. I've tried sudo /etc/init.d/mysql reload, sudo /etc/init.d/mysql restart and more, but it never seems to make much of a difference...

marked as duplicate by Zanna, user117103, edwinksl, jokerdino Mar 9 '17 at 19:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • execute sudo service mysql status this would tell you if the server is running, if so, than you should go to the programming language you are using, is it accessing the server, did you keep the same DB name, table name, passwords the same or changed something – younes Nov 23 '14 at 1:09
  • Post the error message you get ,, from logs or otherwise. – Panther Nov 23 '14 at 1:32
  • @younes sudo service mysql status returns mysql start/running, process 1532 and yes, i have made im using the correct username and password, and the database is imported from my mac. @bodhi.zazen at first I couldn't see any errors, but now I get Fatal error: Call to undefined function mcrypt_encrypt() in /var/www/html/functions.php on line 109 which might explain why nothing loads, since there is a password check on nearly every page... :/ – Olav Bakke Svendsen Nov 23 '14 at 14:00

Solution: I actually got it to work, and i found out that it mcrypt was causing all the problems, not mysql as i first thought. This is how i managed to solve it: Mcrypt extension is missing in 14.04 server for mysql Thanks for helping me out! :)

Not the answer you're looking for? Browse other questions tagged or ask your own question.