The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 4 of 4

Thread: Configuring SQL with localhost?

  1. #1
    145
    posts
    Registered User

    Configuring SQL with localhost?

    Hi Guys,

    I have a 64 bit machine , i am facing some difficulity configuring mysql to apache.
    I already have apache and php working together fine for quite some time. I can access the root page on:
    http://localhost:8080

    Today i installed MySQL Server 5.1, and from the command prompt i created a database and a table inside it. But i'm unable to access it from PHP. I can say it doesn't recognize it because this command isn't producing anything:

    mysql_connect ("localhost", "root", "pass") or die('Cannot connect to the database because: ' . mysql_error());


    It should have shown be an error if it couldn't connect. no?

    So do you have any suggestions on how do i configure it then please post.

    Thanks a lot in advance!

    PS- Also MYSQL Server5.1 doesn't have a UI for creating databases etc stuff. Do you know of any link which provides me that (on 64 bit machine)?

  2. #2
    jwilliam's Avatar
    476
    posts
    An intellectual carrot!
    What is showing up in your apache error/access logs?

    You could install phpmyadmin to help you administer mysql.

  3. #3
    145
    posts
    Registered User
    Hi,

    Thanks for the help ....

    Now i have installed phpMyAdmin but it is giving an error:
    Cannot load mysql extension. Please check your PHP configuration. - Documentation

    So i searched and i found this line in the documentation:
    MySQL is no longer enabled by default, so the php_mysql.dll DLL must be enabled inside of php.ini.

    But i couldn't figure php_mysql.dll anywhere , its neither in the SQL installation directory nor in PHP installation.

    Where can i find it and what do i add in php.ini file?

  4. #4
    145
    posts
    Registered User
    Finally solved!

    Those who face this error, here is what i did:
    I installed PHP again , this time with mysql extension. And then copied file "libmysql.dll" from Php DIrectory to Apache Bin directory.

    I'm still getting some "Cannot load mcrypt extension. Please check your PHP configuration." but i'm able to login and manipulate databases so for now i'm ignoring it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012