Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20
Greetings, If still you are not able to reset the password for MySQL please refer to the following link: http://sunsite.mff.cuni.cz/MIRRORS/f...rmissions.html Regards...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Apr 2005
    Posts
    88

    Greetings,

    If still you are not able to reset the password for MySQL please refer to the following link:

    http://sunsite.mff.cuni.cz/MIRRORS/f...rmissions.html

    Regards

  2. #12
    Just Joined!
    Join Date
    Dec 2004
    Location
    localhost
    Posts
    56
    Ive gotten this far in the terminal. I wasn't able to do the stuff in the terminal. It did not reconize the first part. I got this far however:
    Usage: /usr/lib/mysql/mysql_config [OPTIONS]
    Options:
    --cflags [-I'/usr/include/mysql']
    --libs [-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm]
    --socket [/var/lib/mysql/mysql.sock]
    --port [3306]
    --version [3.23.58]
    I've tried resetting the password using this document: http://sunsite.mff.cuni.cz/MIRRORS/f...rmissions.html as well as using another way to do the same thing. I've tried using webmin to reset the password. But I am still unable to use MySQL. Maybe there is something wrong with my (unchanged) PHP settings that is not allowing MySQL to be used.
    Webmin can edit/add/change anything mysql, but I can't do anything using PHP. I even tried installing PHPBB:
    phpBB : Critical Error

    Could not connect to the database
    Should I reinstall MySQL? (which download then?)

  3. #13
    Just Joined!
    Join Date
    Apr 2005
    Posts
    88
    Greetings,

    If you can't get back from the point you are I wud suggest you to reinstall the MySQL. You can find the appropriate version of MySQL from http://www.mysql.com as it depends on your requiremnet which version of MySQL you want.

    Regards

  4. #14
    Just Joined!
    Join Date
    Dec 2004
    Location
    localhost
    Posts
    56
    Quote Originally Posted by KidCloudWala
    Greetings,

    If you can't get back from the point you are I wud suggest you to reinstall the MySQL. You can find the appropriate version of MySQL from http://www.mysql.com as it depends on your requiremnet which version of MySQL you want.

    Regards
    I've done that twice. Once with the RPM version: I don't have two of the needed lib's. And I tried with the .tar.gz type file, following instructions, which did nothing and I still have the old version. I guess I can live without MySQL...

    I tried to install an FTPd program, and now I need libtasn1.so.2 which I don't know where to get, and if I knew where to get it, how to install it.
    I'll continue to look for an FTPd program, or attempt to fix my upload script I tried to make (which might be better than getting an ftpd program working...). Here is the script anyway:
    Code:
    <?php
    
    require&#40;"auth.php"&#41;;
    
    ?>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    
    
    <html>
    
    <head>
    
    	<title>FC3 Server Upload Area</title>
    
    <style type="text/css">
    
    td&#123;font-family&#58;Arial;font-size&#58;12px;&#125;
    
    .t1&#123;background&#58;#eeeeee;border&#58;1px solid #445970;border-width&#58;1px 1px 1px 1px;&#125;
    
    .t2&#123;background&#58;#667b92;border&#58;1px solid #445970;border-width&#58;1px 1px 1px 1px;&#125;
    
    .t3&#123;background&#58;#889db4;border&#58;1px solid #445970;border-width&#58;1px 1px 0px 1px;&#125;
    
    
    
    a&#58;link&#123;color&#58;#667b92;text-decoration&#58;underline;&#125;
    
    a&#58;visited&#123;color&#58;#667b92;text-decoration&#58;underline;&#125;
    
    </style>
    
    </head>
    
    
    
    <body>
    
    
    <table width="100%" cellspacing="1" cellpadding="0" class="t2">
    
    <tr>
    
        <td align="center"><font color="#FFFFFF">FC3 Server Upload Area</font></td>
    
    </tr>
    
    </table>
    
    
    
    
    
    <table width="100%" cellspacing="1" cellpadding="0" class="t3">
    
    <tr>
    
        <td align="center"><font color="#FFFFFF">Specs</font></td>
    
    </tr>
    
    </table>
    
    <table width="100%" cellspacing="2" cellpadding="0" class="t1">
    
    <tr>
    
        <td>
    
    <?php
    // Disk information
    
    $disk_total = disk_total_space&#40;"/"&#41;;
    
    $disk_free = disk_free_space&#40;"/"&#41;;
    
    $r_disk_total = round&#40;disk_total_space&#40;"/"&#41;/1024/1024/1024,3&#41;;
    
    $r_disk_free = round&#40;disk_free_space&#40;"/"&#41;/1024/1024/1024,3&#41;;
    
    $used = $r_disk_total - $r_disk_free;
    
    $usage = &#40;&#40;$disk_free / $disk_total&#41; * -100&#41; + 100;
    
    echo "<table cellpadding=\"1\" cellspacing=\"0\">
    
    <tr>
    
           <td width=\"125\">Disk free&#58;</td>
    
           <td>" .$r_disk_free. " gigabytes.</td>
    
    </tr>
    
    <tr>
    
           <td>Disk used&#58;</td>
    
           <td>" .$used. " gigabytes.</td>
    
    </tr>
    
    <tr>
    
           <td>Disk total&#58;</td>
    
           <td>" .$r_disk_total. " gigabytes.</td>
    
    </tr>
    
    <tr>
    
           <td>Disk usage&#58;</td>
    
           <td>" .round&#40;$usage&#41;. "%.</td>
    
    </tr>
    
    </table>";
    
    ?>
    
    </td>
    
    </tr>
    
    </table>
    
    
    
    
    <table width="100%" cellspacing="1" cellpadding="0" class="t3">
    
    <tr>
    
        <td align="center"><font color="#FFFFFF">Management</font></td>
    
    </tr>
    
    </table>
    
    <table width="100%" cellspacing="2" cellpadding="0" class="t1">
    
    <tr>
    
        <td>
    
    <?php
    
    // >>> Uploader Script <<<
    
    echo "<a href=\"logout.php\">Logout</a>
    
    <a href=\"?type=\">Uploaded file index</a>
    
    
    <a href=\"?type=mkdir\">Make a directory</a>
    
    
    <a href=\"?type=rmdir\">Remove a directory</a>
    
    
    
    
    
    <a href=\"?type=upfile\">Upload file&#40;s&#41;</a>
    
    
    <a href=\"?type=unlink\">Remove a file</a>
    
    
    
    ";
    
    
    
    if &#40;$_GET&#91;'type'&#93; == "mkdir" | $_POST&#91;'type'&#93; == "mkdir"&#41; &#123;
    
     /*** Make dir ***/
    
     if &#40;$_POST&#91;'confirm'&#93; == "y"&#41; &#123;
    
      mkdir&#40;$_POST&#91;'path'&#93;. "/" .$_POST&#91;'name'&#93;, $_POST&#91;'chmod'&#93;&#41; or die&#40;"Could not create the directory."&#41;;
    
     &#125; else &#123;
    
      echo "<form action=\"\" method=\"post\">
    
    Make a directory
    
    <table cellpadding=\"1\" cellspacing=\"0\">
    
    <tr>
    
           <td width=\"125\">Name&#58;</td>
    
           <td><input type=\"text\" name=\"name\"></td>
    
    </tr>
    
    <tr>
    
           <td>Path&#58;</td>
    
           <td><input type=\"text\" name=\"path\" value=\"/var/www/html/\"></td>
    
    </tr>
    
    <tr>
    
           <td>Chmod&#58;</td>
    
           <td><input type=\"text\" name=\"chmod\" value=\"0755\"></td>
    
    </tr>
    
    <tr>
    
           <td><input type=\"hidden\" name=\"type\" value=\"mkdir\">
    
    <input type=\"hidden\" name=\"confirm\" value=\"y\"></td>
    
           <td><input type=\"submit\" value=\"Create\"></td>
    
    </tr>
    
    </table>
    
    </form>";
    
     &#125;
    
     /*** END Make dir ***/
    
    &#125; else if &#40;$_GET&#91;'type'&#93; == "rmdir" | $_POST&#91;'type'&#93; == "rmdir"&#41; &#123;
    
     if &#40;$_POST&#91;'confirm'&#93; == "y"&#41; &#123;
    
      rmdir&#40;$_POST&#91;'path'&#93;. "/" .$_POST&#91;'name'&#93;&#41;;
    
     &#125; else &#123;
    
      echo "<form action=\"\" method=\"post\">
    
    Remove a directory
    
    <table cellpadding=\"1\" cellspacing=\"0\">
    
    <tr>
    
           <td width=\"125\">Name&#58;</td>
    
           <td><input type=\"text\" name=\"name\"></td>
    
    </tr>
    
    <tr>
    
           <td>Path&#58;</td>
    
           <td><input type=\"text\" name=\"path\" value=\"/var/www/html/\"></td>
    
    </tr>
    
    <tr>
    
           <td><input type=\"hidden\" name=\"type\" value=\"rmdir\">
    
    <input type=\"hidden\" name=\"confirm\" value=\"y\"></td>
    
           <td><input type=\"submit\" value=\"Remove\"></td>
    
    </tr>
    
    </table>
    
    </form>";
    
     &#125;
    
    &#125; else if &#40;$_GET&#91;'type'&#93; == "unlink" | $_POST&#91;'type'&#93; == "unlink"&#41; &#123;
    
     if &#40;$_POST&#91;'confirm'&#93; == "y"&#41; &#123;
    
      unlink&#40;$_GET&#91;'name'&#93;&#41; or die&#40;"Could not delete the file."&#41;;
    
     &#125; else &#123;
    
      echo "<form action=\"\" method=\"post\">
    
    Remove a File
    
    <table cellpadding=\"1\" cellspacing=\"0\">
    
    <tr>
    
           <td width=\"125\">Name&#58;</td>
    
           <td><input type=\"text\" name=\"name\"></td>
    
    </tr>
    
    <tr>
    
           <td>Path&#58;</td>
    
           <td><input type=\"text\" name=\"path\" value=\"/var/www/html/\"></td>
    
    </tr>
    
    <tr>
    
           <td><input type=\"hidden\" name=\"type\" value=\"unlink\">
    
    <input type=\"hidden\" name=\"confirm\" value=\"y\"></td>
    
           <td><input type=\"submit\" value=\"Remove\"></td>
    
    </tr>
    
    </table>
    
    </form>";
    
     &#125;
    
    &#125; else if &#40;$_GET&#91;'type'&#93; == "upfile" | $_POST&#91;'type'&#93; == "upfile"&#41; &#123;
    
     if &#40;$_POST&#91;'confirm'&#93; == "y"&#41; &#123;
    
      extract&#40;$_POST&#41;;
    
      $file1_name = $HTTP_POST_FILES&#91;'upload1'&#93;&#91;'name'&#93;;
    
      $file1_size = $HTTP_POST_FILES&#91;'upload1'&#93;&#91;'size'&#93;;
    
      $file1_type = $HTTP_POST_FILES&#91;'upload1'&#93;&#91;'type'&#93;;
    
    
    
      $file2_name = $HTTP_POST_FILES&#91;'upload2'&#93;&#91;'name'&#93;;
    
      $file2_size = $HTTP_POST_FILES&#91;'upload2'&#93;&#91;'size'&#93;;
    
      $file2_type = $HTTP_POST_FILES&#91;'upload2'&#93;&#91;'type'&#93;;
    
    
    
      $file3_name = $HTTP_POST_FILES&#91;'upload3'&#93;&#91;'name'&#93;;
    
      $file3_size = $HTTP_POST_FILES&#91;'upload3'&#93;&#91;'size'&#93;;
    
      $file3_type = $HTTP_POST_FILES&#91;'upload3'&#93;&#91;'type'&#93;;
    
      if &#40;file_exists&#40;$path."/".$HTTP_POST_FILES&#91;'upload1'&#93;&#91;'name'&#93;&#41; && $overwrite != "y"&#41; &#123;
    
       echo "File already exists for upload 1.";
    
       exit&#40;&#41;;
    
      &#125; else &#123;
    
       echo "Note&#58; A previous file by the same name as upload 1 has been overwritten.
    ";
    
      &#125;
    
      if &#40;file_exists&#40;$path."/".$HTTP_POST_FILES&#91;'upload2'&#93;&#91;'name'&#93;&#41; && $overwrite != "y"&#41; &#123;
    
       echo "File already exists for upload 2.";
    
       exit&#40;&#41;;
    
      &#125; else &#123;
    
       echo "Note&#58; A previous file by the same name as upload 2 has been overwritten.
    ";
    
      &#125;
    
      if &#40;file_exists&#40;$path."/".$HTTP_POST_FILES&#91;'upload3'&#93;&#91;'name'&#93;&#41; && $overwrite != "y"&#41; &#123;
    
       echo "File already exists for upload 3.";
    
       exit&#40;&#41;;
    
      &#125; else &#123;
    
       echo "Note&#58; A previous file by the same name as upload 3 has been overwritten.
    ";
    
      &#125;
    
      // If hosted in web directory
    
      if &#40;strpos&#40;$path, "/var/www/html/"&#41;&#41; &#123;
    
       str_replace&#40;"/var/www/html/", "http&#58;//fc3.quate.net/", $path&#41;;
    
      &#125;
    
      $ftmp = $HTTP_POST_FILES&#91;'upload1'&#93;&#91;'tmp_name'&#93;;
    
      $fname = $HTTP_POST_FILES&#91;'upload1'&#93;&#91;'name'&#93;;
    
      move_uploaded_file&#40;$ftmp, $fname&#41;;
    
      $ftmp = $HTTP_POST_FILES&#91;'upload2'&#93;&#91;'tmp_name'&#93;;
    
      $fname = $HTTP_POST_FILES&#91;'upload2'&#93;&#91;'name'&#93;;
    
      move_uploaded_file&#40;$ftmp, $fname&#41;;
    
      $ftmp = $HTTP_POST_FILES&#91;'upload3'&#93;&#91;'tmp_name'&#93;;
    
      $fname = $HTTP_POST_FILES&#91;'upload3'&#93;&#91;'name'&#93;;
    
      move_uploaded_file&#40;$ftmp, $fname&#41;;
    
      if &#40;!&#40;is_uploaded_file&#40;$_FILES&#91;'upload1'&#93;&#91;'tmp_name'&#93;&#41;&#41;&#41; &#123;
    
      
    
      &#125; else &#123;
    
       echo "Upload 1 sucessfully uploaded.
    
    
    The file is located at <a href=\"" .$path. "/" .$HTTP_POST_FILES&#91;'upload1'&#93;&#91;'name'&#93;. "\">" .$path. "/" .$HTTP_POST_FILES&#91;'upload1'&#93;&#91;'name'&#93;. "</a>
    ";
    
      &#125;
    
      if &#40;!&#40;is_uploaded_file&#40;$_FILES&#91;'upload1'&#93;&#91;'tmp_name'&#93;&#41;&#41;&#41; &#123;
    
      
    
      &#125; else &#123;
    
       echo "Upload 2 sucessfully uploaded.
    
    
    The file is located at <a href=\"" .$path. "/" .$HTTP_POST_FILES&#91;'upload12'&#93;&#91;'name'&#93;. "\">" .$path. "/" .$HTTP_POST_FILES&#91;'upload2'&#93;&#91;'name'&#93;. "</a>
    ";
    
      &#125;
    
      if &#40;!&#40;is_uploaded_file&#40;$_FILES&#91;'upload1'&#93;&#91;'tmp_name'&#93;&#41;&#41;&#41; &#123;
    
      
    
      &#125; else &#123;
    
       echo "Upload 3 sucessfully uploaded.
    
    
    The file is located at <a href=\"" .$path. "/" .$HTTP_POST_FILES&#91;'upload3'&#93;&#91;'name'&#93;. "\">" .$path. "/" .$HTTP_POST_FILES&#91;'upload3'&#93;&#91;'name'&#93;. "</a>
    ";
    
      &#125;
    
     &#125; else &#123;
    
      echo "<form action=\"\" method=\"post\">
    
    Upload file&#40;s&#41;<table cellpadding=\"1\" cellspacing=\"0\">
    
    <tr>
    
           <td width=\"125\">Upload&#58;</td>
    
           <td><input type=\"file\" name=\"upload1\" value=\"\"></td>
    
    </tr>
    
    <tr>
    
           <td>Upload&#58;</td>
    
           <td><input type=\"file\" name=\"upload2\" value=\"\"></td>
    
    </tr>
    
    <tr>
    
           <td>Upload&#58;</td>
    
           <td><input type=\"file\" name=\"upload3\" value=\"\"></td>
    
    </tr>
    
    <tr>
    
           <td>Chmod for all&#58;</td>
    
           <td><input type=\"text\" name=\"chmod\" value=\"0755\"></td>
    
    </tr>
    
    <tr>
    
           <td>Path for all&#58;</td>
    
           <td><input type=\"text\" name=\"path\" value=\"/var/www/html/\" disabled></td>
    
    </tr>
    
    <tr>
    
           <td>Overwrite previous files?</td>
    
           <td><input type=\"checkbox\" name=\"overwrite\" value=\"y\"> Yes</td>
    
    </tr>
    
    <tr>
    
           <td><input type=\"hidden\" name=\"type\" value=\"upfile\">
    
    <input type=\"hidden\" name=\"confirm\" value=\"y\"></td>
    
           <td><input type=\"submit\" value=\"Upload\"></td>
    
    </tr>
    
    </table>
    
    </form>";
    
     &#125;
    
    &#125;
    
    ?>
    
    	</td>
    
    </tr>
    
    </table>
    
    
    
    
    <div align="right">[img]fedora_linux.png[/img]</div>
    
    </body>
    
    </html>
    I am probably going to try to find a simple upload file code that someone else made, and edit it to my needs because this doesn't seem to be working correctly.

    Well, thanks everyone for all the help. Although I didn't get too far with getting MySQL to work, I've learned somethings durring the process.
    Thanks.

  5. #15
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    Quote Originally Posted by version2
    I am probably going to try to find a simple upload file code that someone else made, and edit it to my needs because this doesn't seem to be working correctly.
    hotscripts.com seems to have a lot of stuff that should fit that bill.

  6. #16
    hg
    hg is offline
    Just Joined!
    Join Date
    Jun 2005
    Posts
    2

    Re: Setting up PHP and MySQL

    I am running Fedora CORE 3 on one computer. I get a error when use php connect to mysql:

    #2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)


    Mysql already started. I can work with mysql in Konsole.

    Anyone help me, pls! Thanks.

  7. #17
    Just Joined!
    Join Date
    Apr 2005
    Posts
    88

    FTP File Upload Code

    Greetings,

    Version2 please try the under mentioned file upload code for FTP

    ##############################
    #!/bin/sh
    HOST=<IP Address of the FTP Server>
    USER=<Username>
    PASS=<Password>
    FILE="$1"
    FOLDER="$2"
    MODE="$3"
    if [ $MODE == "" ]; then
    MODE="ascii"
    fi

    echo "Uploading file $FILE"

    ftp -in $HOST << END
    user $USER $PASS
    $MODE
    cd $FOLDER
    hash
    mput $FILE
    bye

    END
    ############################

    Regards

  8. #18
    Just Joined!
    Join Date
    Apr 2005
    Posts
    88

    MySQL Connect

    Greetings,

    Just create the mysql.sock file using the touch command i.e. touch /var/lib/mysql/mysql.sock and the start the mysql server. To start the mysql server start the mysqld server by giving the command
    service mysqld start.

    Regards

  9. #19
    hg
    hg is offline
    Just Joined!
    Join Date
    Jun 2005
    Posts
    2

    Re: MySQL Connect

    Quote Originally Posted by KidCloudWala
    Greetings,

    Just create the mysql.sock file using the touch command i.e. touch /var/lib/mysql/mysql.sock and the start the mysql server. To start the mysql server start the mysqld server by giving the command
    service mysqld start.

    Regards
    I have done but still get the same error.
    Pls help me!

  10. #20
    Just Joined!
    Join Date
    Oct 2009
    Posts
    19
    Quote Originally Posted by gwalters View Post
    Im gonna bet that the apache webroot isnt user writable so you made the file as root. Try
    Code:
    chmod 777 /var/www/html/phpinfo.php
    as root then retry viewing the file.
    Hello...

    I had this problem too, and this way worked pretty good with me....I have a question about this, does it mean that every php file saved in this folder that I want to see has to be first used with the chmod command? or can I just make the chmod 777 /var/www/html for the entire folder?

    thanks for your responses

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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