SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Norcross, GA
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just installed php/apache/mysql on a freebsd server.

    Php is working fine, but I don't know how to set up a mysql username and password. Mysql is recognized per phpinfo().

    What do I need to do to get a user/pw established?
    - Mike
    http://www.georgiaoffroad.com

  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)
    MOst likely you can log on as root, I think by default the config is root has no password when you first try to log in so do

    mysql -u root


    Then do

    mysql>GRANT ALL PRIVILEGES ON *.* TO username@localhost
    IDENTIFIED BY 'passwordofyourchoice' WITH GRANT OPTION;

    mysql>FLUSH PRIVILEGES;
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Addict isuru's Avatar
    Join Date
    Nov 2000
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what does FLUSH PRVILIGES do?

  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)
    The same thing as mysqladmin -u root reload

    It just rereads the user tbales so that the additional user's rights will be usable by MySQL
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Norcross, GA
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's the situation..

    MySQL is recognized per phpinfo(). However when I log on via telnet and type

    prompt% mysql

    it returns a 'command not found' error.

    Is this something I should be able to fix?

  6. #6
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    phpinfo() is just telling you that MySQL support is installed in PHP. It sounds like you need to either add your MySQL 'bin' directory to your path, or create a symbolic link to the 'mysql' program in your own 'bin' directory.

    The alternative is to run 'mysql' by typing the complete path to the program (e.g. /usr/local/mysql/bin/mysql).
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  7. #7
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Norcross, GA
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, there is no mysql in usr/local/bin, I can't find it anywhere.

    Is there a simple binary available to install mysql?

    And two, would I need to reboot the server to finalize the installation?

    - Mike

  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)
    Like Kevin said. you must either make a symbolic link from your bin dir to Mysql's bin dir or add the mysql bin dir to your path or navigate into the mysql/bin dir and run mysql from there. If you don't have MySQL you can compile it onm your server get it from http://www.mysql.com it is really easy to do on Linux not sure about cobalt though?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


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
  •