<PAGE>
 
                                                         Exhibit 10.5(d)

                                                         [EXECUTION COUNTERPART]


                              AMENDMENT NO. 3 TO
                 SECOND AMENDED AND RESTATED CREDIT AGREEMENT

          AMENDMENT NO. 3 TO SECOND AMENDED AND RESTATED CREDIT AGREEMENT dated

as of July 1, 1998, between MEDIACOM CALIFORNIA LLC, a Delaware limited
liability company ("Mediacom California"); MEDIACOM DELAWARE LLC, a Delaware
                    -------------------
limited liability company ("Mediacom Delaware"); MEDIACOM ARIZONA LLC, a
                            -----------------
Delaware limited liability company ("Mediacom Arizona" and, together with
                                     ----------------
Mediacom California and Mediacom Delaware, the "Borrowers"); each of the lenders
                                                ---------
that is a signatory hereto identified under the caption "LENDERS" on the
signature pages hereto (each, individually, a "Lender" and, collectively, the
"Lenders"); THE CHASE MANHATTAN BANK, as administrative agent for the Lenders
 -------
(in such capacity, the "Administrative Agent"); and FIRST UNION NATIONAL BANK,
                        --------------------
as documentation agent (in such capacity, the "Documentation Agent").
                                               -------------------

          The Borrowers, the Lenders, the Administrative Agent and the
Documentation Agent are party to a Second Amended and Restated Credit Agreement
dated as of June 24, 1997 (as heretofore modified and supplemented and in effect
on the date hereof, the "Credit Agreement"), providing, subject to the terms and
                         ----------------
conditions thereof, for loans in an aggregate principal amount up to but not
exceeding $100,000,000. The Borrowers, the Lenders, the Administrative Agent and
the Documentation Agent wish to amend the Credit Agreement in certain respects,
and accordingly, the parties hereto hereby agree as follows:

          Section 1. Definitions. Except as otherwise defined in this Amendment
                     -----------
No. 3, terms defined in the Credit Agreement are used herein as defined therein.

          Section 2. Amendments. Upon execution and delivery of this Amendment
                     ----------
No. 3 by the Borrowers and Majority Lenders, but effective as of the date
hereof, the Credit Agreement shall be amended as follows:

          2.01. References in the Credit Agreement (including references to the
Credit Agreement as amended hereby) to "this Agreement" (and indirect references
such as "hereunder", "hereby", "herein" and "hereof") shall be deemed to be
references to the Credit Agreement as amended hereby.

          2.02. Section 1.01 of the Credit Agreement shall be amended by adding
the following new definition and inserting the same in the appropriate
alphabetical location:

          "Clearlake Acquisition" shall mean the acquisition by Mediacom
           ---------------------       
     California of substantially all of the assets of the cable television
     systems of Jones Cable Fund 1 - B\C


                      Amendment No. 3 to Credit Agreement
                      -----------------------------------
<PAGE>
 
                                      -2-


     Joint Venture located in Lake County, California pursuant to an Asset
     Purchase Agreement dated as of September 17, 1997 between Jones Cable
     Fund 1 - B\C Joint Venture and Mediacom California.

          2.03. Section 8.09(d) of the Credit Agreement is hereby amended
deleting clause (iii) thereof, inserting the word "and" at the end of clause (i)
thereof and replacing "; and" at the end of clause (ii) thereof with a period.

          2.04. Section 8.12 of the Credit Agreement is hereby amended to read
in its entirety as follows:

          "8.12  Capital Expenditures. The Borrowers will not permit the
     aggregate amount of Capital Expenditures to exceed (i) $19,500,000 for the
     period from and including the Effective Date through December 31, 1998,
     (ii) $6,000,000 for the fiscal year ending on December 31, 1999 and (iii)
     $4,500,000 for each fiscal year commencing after December 31, 1999. If the
     aggregate amount of Capital Expenditures shall be less than $19,500,000 for
     the period from and including the Effective Date through December 31, 1998,
     then the shortfall shall be added to the amount of Capital Expenditures
     permitted for the fiscal year ending on December 31, 1999 so long as the
     upgrades and rebuilds with respect to the Spring 1997 Acquisitions and the
     Clearlake Acquisition have not yet been completed."

          Section 3. Miscellaneous. Except as herein provided, the Credit
                     -------------
Agreement shall remain unchanged and in full force and effect. This Amendment
No. 3 may be executed in any number of counterparts, all of which taken together
shall constitute one and the same amendatory instrument and any of the parties
hereto may execute this Amendment No. 3 by signing any such counterpart. This
Amendment No. 3 shall be governed by, and construed in accordance with, the law
of the State of New York.


                      Amendment No. 3 to Credit Agreement
                      -----------------------------------
<PAGE>
 
                                      -3-


          IN WITNESS WHEREOF, the parties hereto have caused this Amendment No.
3 to be duly executed and delivered as of the day and year first above written.

                               MEDIACOM CALIFORNIA LLC


                               By
                                 --------------------------------
                                 Title:



                               MEDIACOM DELAWARE LLC


                               By
                                 --------------------------------
                                 Title:



                               MEDIACOM ARIZONA LLC


                               By
                                 --------------------------------
                                 Title:



                             LENDERS
                             -------



                               THE CHASE MANHATTAN BANK


                               By
                                 --------------------------------
                                 Title:


                      Amendment No. 3 to Credit Agreement
                      -----------------------------------
<PAGE>

                                      -4-


                               FIRST UNION NATIONAL BANK


                               By
                                 --------------------------------
                                 Title:




                               BANK OF MONTREAL


                               By
                                 --------------------------------
                                 Title:



                               CIBC INC.


                               By
                                 --------------------------------
                                 Title:



                               THE FIRST NATIONAL BANK OF CHICAGO


                               By
                                 --------------------------------
                                 Title:



                               MELLON BANK, N.A.


                               By
                                 --------------------------------
                                 Title:


                      Amendment No. 3 to Credit Agreement
                      -----------------------------------
<PAGE>

                                      -5-


                        ADMINISTRATIVE AGENT
                        --------------------
                                        

                               THE CHASE MANHATTAN BANK, as
                                 Administrative Agent



                               By
                                 --------------------------------
                                 Title:



                        DOCUMENTATION AGENT
                        -------------------
                                        

                               FIRST UNION NATIONAL BANK, as
                               Documentation Agent



                               By
                                 --------------------------------
                                 Title:


                      Amendment No. 3 to Credit Agreement
                      -----------------------------------