1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Rep Power

    Cannot connect to mysql first time

    I've installed mysql 5.5 to work with php.From the workbench I tried to connect first time, impossible.I've allowed the program through the firewall,nothing.I read all the tutorials on the subject, still I don't understand one thing. How do I set admin privileges if I cannot connect?
    If I run the scripts on the command prompt I get error. Some tutorials talk about installing Wamp or other software, why do I need more junk on my pc to have mysql
    working? And when they talk about the shell, where is the shell on the workbench? If I go to start, MySQL,MySQL Server 5.5.,Command Line Prompt it disappears immediately, so where do I type the script?
    I like my sql express and management studio better, do I need mysql to work with php?Getting frustrated.
    Thanks for your help.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Rep Power
    You don't need any junk, unless you want them to solve problems for you

    Please, calm down I don't understand exactly what you can or can not do.

    1) Did you start MySQL? (see running processes)
    2) Are you able to connect to MySQL via the mysql command-line client? If you didn't change default settings (the port number) you start it this way:
    mysql -u root -p
    the it asks you the password for root, which is an empty string at the moment, so just press enter.
  4. #3
  5. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Rep Power
    WAMP (usually) stands for Windows-Apache-MySQL-PHP. Since you're trying to connect MySQL and PHP, I'm assuming you're doing web development, in which case you would need a web server too (hence Apache). If you're not doing web development, then you don't need Apache.

    The reason many tutorials recommend something like XAMPP or WAMP is because PHP and MySQL can be difficult and confusing to install on Windows. Although they are compatible with Windows, they are generally far easier to use on a Linux based system. WAMP and XAMPP are bundled installers that install pre-configured versions of PHP, MySQL and Apache. The pre-configured versions are already set up to work with each other correctly. If you install them separately, then you have to do the configuration on your own. I'm not sure about WAMP, but XAMPP also includes a control panel for starting and stopping the services as well; otherwise you have to take care of doing that manually on your own too.

    If your primary goal is to learn how to program, and not to learn how to do server administration, then I highly recommend using XAMPP instead of trying to install each program separately yourself. XAMPP is not suitable for production servers, but it is extremely useful for Windows development servers.

    You do not need MySQL to program in PHP, unless of course your goal is to use PHP to access a MySQL database. You also do not need a web server to program in PHP, unless your goal is to build a website.

    If you are getting error messages you should post those, as they probably contain pretty valuable information.

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo