mysql connection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bowtie
    New Member
    • Oct 2007
    • 25

    mysql connection

    i installed easy php which has both the Apache and MySql server,but when i try to connect to mysql in php using the mysql_connect() ,im not setting any parameters there is an error notifying me that it cant connect ,are there any configurations that i have to do to the mysql so that it connects,im mainly concerned on the issue of clients who can connect to the mysql.pliz help
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    using the mysql_connect() ,im not setting any parameters
    You are not giving php much chance here.
    Why are you passing empty parameters?

    Comment

    • mwasif
      Recognized Expert Contributor
      • Jul 2006
      • 802

      #3
      Checkout the examples how to connect to MySQL using mysql_connect.

      Comment

      • bowtie
        New Member
        • Oct 2007
        • 25

        #4
        Originally posted by code green
        You are not giving php much chance here.
        Why are you passing empty parameters?
        i have tried to pass some parameters ,but the issue is it seems as if there are some configurations that you have to do so that those parameters ie host,username and password ,will be recognised,so that is what i really want to understand.

        Comment

        • bowtie
          New Member
          • Oct 2007
          • 25

          #5
          Originally posted by mwasif
          Checkout the examples how to connect to MySQL using mysql_connect.
          i have checked the examples and there seems to be some enlightment now,but still the issue remains,on the issue of the parameters,when i try to use my own host name,username and password ,there is an error that those parameters are not recognised and when i dont pass any parameters ie will be assuming that it uses the default parameters still there is this error CANNOT CONNECT USING ODBC@localhost .what could be the problem !!!!where do i first set those parameters so that there will recognised,and what do you do so that the default parameters wil be recognised

          Comment

          • mwasif
            Recognized Expert Contributor
            • Jul 2006
            • 802

            #6
            You need a valid MySQL user to connect to MySQL Server. You can create a user using command GRANT. You can also create users with GUIs like phpMyAdmin.

            Comment

            Working...