SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Hybrid View

  1. #1
    SitePoint Zealot martin's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mySQL Installation problem

    Dear All,

    I am trying to install Mysql as per your instructions on "Building a Database-Driven Web Site using PHP & MySQL. On my Linux 7.1 PPC.

    I followed all the instructions and everything went fine (the server said it was up and running) until I tried to add the mysql.server script into /etc/rc.d/init.d/

    I copied the file into the desired location did the chmod command and made the other files S99mysql in directories rc3.d and rc5.d but upon restart when I go to see if mysql server is running (bin/safe_mysqd --user=mysqlusr & I get "No such file or directory"
    and the same message when I try to "bin/mysqladmin -u root status" to see if its running from start up.

    This is the first time I've ever compiled an app from scratch (I'm a real newby!) any help or ideas greatly appreciated - sorry if this is the wrong forum for this question.

    Thanks Martin
    Martin

  2. #2
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I ran into a similiar problem when I first started. The problem was that I found out that the OS installation was installing Apache, and MySQL. I was then building the code myself and installing that. Basicaly I had two copies of these programs. Needless to say, I had problems... What I finnaly did was re install the OS with no add ons and built everything from scratch...
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  3. #3
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    when I go to see if mysql server is running (bin/safe_mysqd --user=mysqlusr & I get "No such file or directory"
    Martin,

    Are you running these commands from within the MySQL installation directory (/usr/local/mysql)? If not, that would explain why the commands are not recognized.

    Actually, you should probably add the commands to your path so you can run them from anywhere:

    Code:
    % ln –s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
    % ln –s /usr/local/mysql/bin/mysqladmin /usr/local/bin/mysqladmin
    % ln -s /usr/local/mysql/bin/mysqldump /usr/local/bin/mysqldump
    then log out and log back in. You can now run the 'mysql', 'mysqladmin', and 'mysqldump' commands anywhere you want.
    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

  4. #4
    SitePoint Zealot martin's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    file there!

    I have double checked that safe_mysqld is in the directory /usr/local/mysql/bin (which it is) from there I tried safe_mysqld --user=mysqlusr & and recieved the following:

    bash: safe_mysqld: command not found
    [2] 840
    [1] Exit 127 safe_mysqld --user=mysqlusr
    [2]+ Exit 127 safe_mysqld --user=mysqlusr

    Does it matter if I'm logged in as root or not?

    With requards to adding in commands to the path in what file should these be added? As I said when I first installed this everything was working first time, its only after restarting that nothing seems to work!

    As far as I'm aware Apache is not currently installed. I am going to attempt that if I ever get this working!
    Martin

  5. #5
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Running the commands I gave above will add the programs to your path.

    It's fine if safe_mysqld is in that directory, but are you running it from that directory? Example:

    % cd /usr/local/mysql/bin
    % safe_mysqld --user=mysqlusr &
    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

  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)
    IN order to run a program in the same folder you are currently in, you must append a ./ to the beginning, not sure if that is goign to fix your problem, but it will fix the problem of your server saying no file found.


    bash: cd /usr/local/mysql/bin
    bash: ./safe_mysqld
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  7. #7
    SitePoint Zealot martin's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks!

    Thanks guys,

    I double checked everything and the sql server is now up and running - yes I was in the wrong directory - duh!

    I have also got mysql running at boot up, the link files in rc3.d and rc5.d were wrong - fixed this and rebooted and now all up and running!!

    Thanks for your fast and helpful comments - no doubt I'll be back with Apache!!
    Martin

  8. #8
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Congradulations and best of luck to you from here on... Feel free to come back and seek assistance.
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  9. #9
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Were the link files wrong due to a problem in my instructions? I'm currently putting the finishing touches on the 2nd edition, and I'd like to make sure all the problems are fixed.
    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

  10. #10
    SitePoint Zealot martin's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wrong links

    They were wrong for the version of Linux I'm using (Suse 7.1 PPC edition). Although I do have a rc.d directory this is only a link to init.d

    The code in your command line instructions read:

    ln -s ../init.d/mysql.server S99mysql from the rc3 & rc5 directories

    All I had to do was the following:

    ln -s ../mysql.server S99mysql

    I suspect a more experienced Linux user would have realised this in a flash, but since I've only been using Linux for approx. 2 weeks I'm still finding my feet!
    Martin

  11. #11
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I've added a footnote to this effect in the 2nd edition, thanks!
    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


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
  •