SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy 'Can't connect to MySQL server on 'localhost' (10061)'

    I have performed the following (as stated in the MySQL manual):


    1) I have been shutting down the service of the server from the control panel before I start.
    2.) Then in one terminal I change directories to point to the correct bin directory.
    3.) I restart in that terminal from the bin directory in the 'mysqld-nt --skip-grant-tables' mode.
    4.) Open new window.
    5.) Change to bin directory.
    6.) Then I type in 'mysqladmin -u root
    flush-privileges password "newpwd"' -- replacing with my password.
    7.) Hit return.

    Now I have done all that and still recieve this error: 'Can't connect to MySQL server on 'localhost' (10061)'

    *When I set up the server I did check to see if I would get the "Localhost" homepage and did, when I initially installed the software.

    The following is the only chatter on Windows XP in the MySQL reference manual as refering to this particular error:

    If the server is running on Windows NT, 2000, XP, or 2003 and is started with the --enable-named-pipe option, you can also connect with named pipes if you run the client on the host where the server is running. The name of the named pipe is MySQL by default. If you don't give a hostname when connecting to mysqld, a MySQL client first tries to connect to the named pipe. If that doesn't work, it connects to the TCP/IP port. You can force the use of named pipes on Windows by using . as the hostname.

    1st. does this look like a possible approach?

    2nd. Could you help me define some terms?
    What is the client?
    What is a pipe?

    3rd. This reference talks about connecting to mysqld and not mysqld- nt; can we still use this method to connect to mysqld- nt; are we even facing the issue of connecting to mysqld- nt at this point?

    To my understanding the connection to mysqld-nt has already been made. Is there a way to check if it is running or is the connection with local host error showing us that it is not connecting?



    Can anyone step me through this process and get me beyond this error message?


    Thanks,
    --Billy

  2. #2
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have any questions or would like to chat via IM let me know!

    I wanna get started on this book from Site Point!

    I will answer all questions to the best of my ability.

    Thanks again,
    Billy

  3. #3
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Trying to keep this thread alive... I still am in need of assistance and your time and knowledge will greatly appreciated.

    Billy

  4. #4
    SitePoint Guru mdumka's Avatar
    Join Date
    Jul 2003
    Location
    True North
    Posts
    642
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What version of PHP are you running?

  5. #5
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am running PHP 5.0.3.3

  6. #6
    SitePoint Guru mdumka's Avatar
    Join Date
    Jul 2003
    Location
    True North
    Posts
    642
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now I have had alot of trouble setting up my enviroment and by no means an expert.

    To set up my enviroment I started from scratch.

    1) Install Apache, Ensure it works.

    2) Install PHP5, ensure it works (phpinfo())

    3) Install MySql (try a new download) and ensure it is running (winmysqladmin is in the mysql\bin folder on your computer) this app should put a stoplight icon in the task bar. If it is green you are good to go.

    4) Download Navicat (www.navicat.com) free trial and install. This is like SQL Servers Enterprise Manager for MySQL. here you can create DB's and Users. Create a TEST db and a user to go with it. (reply if you dont get that part)

    5) Configure PHP5 to work with MySql following these steps (dows not work out of the box like PHP4) http://www.dbforums.com/t1044828.html

    6) Create a simple PHP script to connect to that DB:
    PHP Code:
    <?php 
        $conn 
    mysql_connect("localhost""admin""admin");
        echo 
    $conn;
    ?>
    You should get a page that says 'Resource id #2', or something like that.

    Let me know how this goes


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
  •