SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2000
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Hope you guys can help me out with this. My problem is that I've got a Raq3 where I have most of my domains located along with MySQL and PHP.

    What I need to do is to create a new database called "search" and let a script from ex. http://www.mysearch.com (which is NOT located in my Raq) use this database both to add, delete and modify tables in this database.

    So how do I do this?

    Thanks!

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Log on to your Raq3 and get into mysq1l and type
    mysql>CREATE DATABASE search;
    mysql>GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ON search.*
    TO username@someodomain.com
    IDENTIFIED BY 'password';
    mysql>FLUSH PRIVILEGES;
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2000
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you!!

    Now the database has been created and the privileges has been given. Over to the next question:

    How do I connect now?

    Every PHP script has a database connnecting system, ex.

    dbhost: localhost
    user: root
    pass: mypass
    db: search

    So what is the dbhost? Is it IP for my RAQ or the domain??

    Thanks!

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    either, normally I use the ip though
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2000
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Getting this when I try to install a script:

    Error: Could not connect to database. Reason: Host '' is not allowed to connect to this MySQL server

    I'm using only username not user@domain.com as SQL username! Is this correct?
    Last edited by risul; Feb 20, 2001 at 13:34.

  6. #6
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oops, you probably need to use the domain name or ip number whichever you put in the GRANT statement you can find out by looking at the contents of the mysql user table by logging into mysql on the Raq3 and then doing

    mysql>use mysql
    mysql>select * from user;


    Look for the user you just added and use whatever is in the host field.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  7. #7
    SitePoint Enthusiast
    Join Date
    Dec 2000
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Host is the domain name with doamin.com. User is the username.

    Ex.

    host: mydoamin.com
    user: myuser

    what do i do??

  8. #8
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So did you try putting mydomain.com into the host arg?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  9. #9
    SitePoint Enthusiast
    Join Date
    Dec 2000
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean that I should use domain.com as the host for mysql connection in the script??

    Or do you mean to alter the privilegs??

  10. #10
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    either alter the host field for that user i nthe mysql db user table, or use domain.com as the host in the connection script. Iwould try to use mydomain.com as the host first.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  11. #11
    SitePoint Enthusiast
    Join Date
    Dec 2000
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How can I use mydomain.com as the host for the database, when the db is located in different server??

    The script is being installed on a server which does not have any connection to my Raq.

    If I have to alter the priv. how do I do this??


Bookmarks

Posting Permissions

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