Results 1 to 8 of 8

Thread: mysql access in php

  1. #1

    Question mysql access in php

    i have installed mysql from LAMP server in suse DVD.
    i have two databases test1 and test2!
    i can delete, insert and select from test1. but i can't do anything with test2 in php!

    from command line i access both of them!
    what should i do? i don't see any error for test2 in my phplog.err!

  2. #2
    ab@novell.com NNTP User

    Default Re: mysql access in php

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    You probably lack rights. How are you accessing the database that leads
    to its failure? Rights in mysql are granted based on where you are
    coming from, what your username it, and what your password is. If you
    don't match all three you aren't necessarily the same 'identity' which
    means you could have different rights. 'root' accessing locally is a
    superuser, while 'root' from your workstation around the world may be a
    nobody.

    Good luck.





    emab wrote:
    > i have installed mysql from LAMP server in suse DVD.
    > i have two databases test1 and test2!
    > i can delete, insert and select from test1. but i can't do anything
    > with test2 in php!
    >
    > from command line i access both of them!
    > what should i do? i don't see any error for test2 in my phplog.err!
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIxXCF3s42bA80+9kRAvm3AJ4qBXmsWbzfrG4PJTDISSIqh+faQwCfbMZs
    9V72tBRGXw0lhayN5iCnMJQ=
    =iSzB
    -----END PGP SIGNATURE-----

  3. #3

    Default Re: mysql access in php

    but i don't receive any error message in error log!

    while using the first db, when i enter information(such as host and user) i receive error in phplog.err!
    but in second database i don't receive errors. also i checked user database! in db table information about this two databases was exactly the same! i'm just confused

    when my work with a database is finished, i have to close it with mysql_close()?
    (i use these databases in different time)

  4. #4
    ab@novell.com NNTP User

    Default Re: mysql access in php

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    What error do you get where and with which DB? Please include as many
    details as clearly as possible or this will quickly get too confusing to
    do this way. If you want post the contents (at least for this user) of
    the mysql.user, mysql.db, mysql.tables_priv, mysql.columns_priv tables.

    Good luck.





    emab wrote:
    > but i don't receive any error message in error log!
    >
    > while using the first db, when i enter information(such as host and
    > user) i receive error in phplog.err!
    > but in second database i don't receive errors. also i checked user
    > database! in db table information about this two databases was exactly
    > the same! i'm just confused
    >
    > when my work with a database is finished, i have to close it with
    > mysql_close()?
    > (i use these databases in different time)
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIxiLu3s42bA80+9kRAspwAJ47seGVW4bt6OIFTdkT0vTiMZlMcgCfaF9j
    orzYDoMrsn6SjPI2iKivkeY=
    =CLSx
    -----END PGP SIGNATURE-----

  5. #5

    Default Re: mysql access in php

    i have two databases: test1 and test2

    test1 works fine! i can delete insert and other data manipulations in my php codes. errors for this database will be written in phplog.err. so there is no problem with this until here!


    test2 doesn't work in my php codes! and no error occurs in phplog.err! so i can't use this database!


    i checked mysql.db and data for these databases where the same!
    i checked mysql.host and data for these databases were the same!

  6. #6
    ab@novell.com NNTP User

    Default Re: mysql access in php

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    And mysql.user?? This is probably the most-important one of all.

    Good luck.





    emab wrote:
    > i have two databases: test1 and test2
    >
    > test1 works fine! i can delete insert and other data manipulations in
    > my php codes. errors for this database will be written in phplog.err. so
    > there is no problem with this until here!
    >
    >
    > test2 doesn't work in my php codes! and no error occurs in phplog.err!
    > so i can't use this database!
    >
    >
    > i checked mysql.db and data for these databases where the same!
    > i checked mysql.host and data for these databases were the same!
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIxi5u3s42bA80+9kRApV5AJsHqzQn/80Mp40t81b2PDWb4UvnqgCeOEP+
    aWHLbvK3msdkCKHsyNb3A9g=
    =73Bd
    -----END PGP SIGNATURE-----

  7. #7

    Default Re: mysql access in php

    i think i found the problem!
    i am using my second(test2) database in CMS projects!

    i can't access to any database just in these files!
    anywhere else(i mean my own PHP codes) i can access to both of those databases!

    now the problem is different! that's why I'm confused! have u used your databases in CMSs like joomla or in ajaxCrud examples?

  8. #8

    Default Re: mysql access in php

    I have personally used them in a manner of ways, but not in any kind of precooked CMS yet. In all likelihood, you'll want to consult a config file within the CMS that you are using. As was noted before, it's most likely a permissions issue. Here is some information for installing it on engarde linux that deals with permissions. Should work similar in OpenSUSE, but you may do the setup in phpMyAdmin.

Posting Permissions

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