7 Replies Latest reply on Aug 26, 2007 11:25 AM by Newsgroup_User

    Noob trying to set up PHP for DreamWeaver

    mahakala8
      When I paste this into the command prompt:
      cd Program Files\MySQL\MySQL Server 5.0\bin mysql -uroot -pPassword CafeTownsend < tutorial.sql

      I get this:
      The system cannnot find the file specified.

      I have checked everything I can think of. I checked the file path. I checked the file name. I don't recall me specifying a User Name when I installed MySQL.( I think that would cause another error message all together.) I triple checked to make sure I had the SQL script file in the bin file. I suspect there must be something here really obvious that I am missing... Can someone shine the light of experience on this situation.

      Thank you.
      Mr. Lipshitz
        • 1. Re: Noob trying to set up PHP for DreamWeaver
          gidgetnc
          Make sure the port you need isn't blocked.
          • 2. Re: Noob trying to set up PHP for DreamWeaver
            Level 7
            David Powers has several excellent books out on PHP and the combination PHP -
            DW in particular. Check out:

            http://www.friendsofed.com/book.html?isbn=1590595696

            and

            http://www.friendsofed.com/book.html?isbn=1590597311

            The author takes you by the so that installing php en mysql becomes a doddle.
            Also gives more than a few helpful hints about php and DW in general.

            (I have no connection what so ever to the author, I am just a very satisfied
            customer).

            --
            Regards,
            Adriana.
            [ put out the rubbish if you need to reach me by e-mail ]
            www.spinsister.nl


            • 3. Re: Noob trying to set up PHP for DreamWeaver
              Level 7
              mahakala8 wrote:
              > When I paste this into the command prompt:
              > cd Program Files\MySQL\MySQL Server 5.0\bin mysql -uroot -pPassword
              > CafeTownsend < tutorial.sql
              >
              > I get this:
              > The system cannnot find the file specified.

              There are two separate commands there. Also, the first one is incorrect.
              It should be this (followed by Enter):

              cd C:\Program Files\MySQL\MySQL Server 5.0\bin

              The second command is this:

              mysql -uroot -pPassword CafeTownsend < tutorial.sql

              This assumes several things:

              1. You have set a password for the root user, and that the password is
              "Password".

              2. You have already created a database called CafeTownsend.

              3. The file tutorial.sql is inside the C:\Program Files\MySQL\MySQL
              Server 5.0\bin folder.

              --
              David Powers, Adobe Community Expert
              Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
              Author, "PHP Solutions" (friends of ED)
              http://foundationphp.com/
              • 4. Re: Noob trying to set up PHP for DreamWeaver
                mahakala8 Level 1
                I apologize. I ought to have included a link to the tutorial I am using.

                http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php_05.html


                The code comes from the tutorial. Here are some responses to your statements Mr. Powers.

                1. I did not include my password in the command line from the tutorial in my post. My password is not pPassword. I do change the default text when entering the command into the prompt. I was concerned that I didn't amend -uRoot when using the command b/c I didn't recall specifying a root name in the MySQL installation. It doesn't ask for one in the MySQL command prompt when I sign on so I assumed it was not an issue.

                2. I did create a database in MySQL named CafeTownsend and checked it using the SHOW DATABASES; and SHOW TABLES IN CAFETOWNSEND; command. It's there.

                3. I have checked several times where I have the tutorial.sql file. It is in the C:\Program Files\MySQL\MySQL
                Server 5.0\bin folder.
                I appreciate you double checking the obvious with me though. It helps me make sure I am doing this correctly.

                >There are two separate commands there. Also, the first one is incorrect.
                >It should be this (followed by Enter):

                >cd C:\Program Files\MySQL\MySQL Server 5.0\bin

                If this is the correct way the command line needs to be written then, I believe the tutorial for this task may need to be revised to inform the user that they need to include the drive letter when executing commands in the command prompt that include a path name. The command line in the tutorial that I have cut and pasted here reads:

                \cd Program Files\MySQL\MySQL Server 5.0\bin mysql -uroot -pPassword CafeTownsend < tutorial.sql

                I'll try your suggestion and get back to you.

                In regards to Gigdetnc, I didn't even think of checking the ports ;-) I did a port scan. Port 80 is open on my machine. I also went back and opened port 81. I turned off the windows firewall. I didn't explain this before. However, is it even necessary to be concerned with ports when you are running an Apache test server on your own development machine?

                Thank you everyone for all of your feedback so far. I appreciate it.

                Regards,

                Mr. Lipshitz
                • 5. Re: Noob trying to set up PHP for DreamWeaver
                  Level 7
                  mahakala8 wrote:
                  > 1. I did not include my password in the command line from the tutorial in my
                  > post. My password is not pPassword. I do change the default text when entering
                  > the command into the prompt. I was concerned that I didn't amend -uRoot when
                  > using the command b/c I didn't recall specifying a root name in the MySQL
                  > installation. It doesn't ask for one in the MySQL command prompt when I sign on
                  > so I assumed it was not an issue.

                  The root user is the MySQL superuser with complete control over every
                  database and user account. It is created by default, so you don't need
                  to specify anything when installing MySQL. A new installation of MySQL
                  is not password protected (if it were, you wouldn't be able to get in).
                  That's why I said it assumes that your root password is Password. The
                  lowercase p in front of Password is the instruction to MySQL that you
                  are supplying the password. If you use that particular way of accessing
                  MySQL, there must be no space between p and Password (or whatever your
                  password is). Since it involves typing out your password in plain text,
                  the normal way is to type just the p. After you press Enter, MySQL then
                  prompts you to enter your password. If you haven't set a password,
                  though, you should leave out the p.

                  >The command line in the tutorial that
                  > I have cut and pasted here reads:
                  >
                  > \cd Program Files\MySQL\MySQL Server 5.0\bin mysql -uroot -pPassword
                  > CafeTownsend < tutorial.sql

                  No, it doesn't. It contains three commands as follows:

                  cd \
                  cd Program Files\MySQL\MySQL Server 5.0\bin
                  mysql -uroot -pPassword CafeTownsend < tutorial.sql

                  The first command (cd \) changes your current directory to the top level
                  of the C drive. The alternative that I gave you accomplishes the first
                  two commands in a single step.

                  > Port 80 is open on my machine. I also went back and opened port 81.
                  > I turned off the windows firewall. I didn't explain this before. However, is it
                  > even necessary to be concerned with ports when you are running an Apache test
                  > server on your own development machine?

                  MySQL doesn't run on port 80; it uses port 3306 by default. The fact
                  that you have managed to create the database through the MySQL Command
                  Line Client indicates that MySQL is working correctly. However, you do
                  need to be concerned about ports and firewalls on your own machine. One
                  of the most common causes of problems with server-side development is
                  the fact that the Windows firewall (or other security software) is
                  blocking communication between Dreamweaver and Apache and/or MySQL.

                  --
                  David Powers, Adobe Community Expert
                  Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
                  Author, "PHP Solutions" (friends of ED)
                  http://foundationphp.com/
                  • 6. Re: Noob trying to set up PHP for DreamWeaver
                    mahakala8 Level 1
                    David,

                    It was my interpretation of the way the command lines are formatted in the tutorial. Adding the drive letter to the path name and splitting up the commands did the trick.

                    Thank you,
                    Mr. Lipshitz
                    • 7. Re: Noob trying to set up PHP for DreamWeaver
                      Level 7
                      mahakala8 wrote:
                      > It was my interpretation of the way the command lines are formatted in the
                      > tutorial. Adding the drive letter to the path name and splitting up the
                      > commands did the trick.

                      Ah, that's where experience of computers before the days of Windows
                      comes in useful. In the "bad" old days, everyone had to learn commands
                      such as cd \.

                      --
                      David Powers, Adobe Community Expert
                      Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
                      Author, "PHP Solutions" (friends of ED)
                      http://foundationphp.com/