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 the damn mysql working?
And when they talk about the shell, where is the damn 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.

Have you tried to use mysqladmin?

mysqladmin -uroot password your_password -h localhost

If you are using Windows browse to the directory which contains the tool and add the extension .exe to mysqladmin command, it should be something like cd \Program Files\MySQL\MySQL server5.0\bin and then:

mysqladmin.exe -uroot password your_password -h localhost

With this command you set the root password and then, finally, you can log into the database server:

mysql -uroot -pyour_password

More info:


If you want to practice with mysql / php you need a web server to handle this.
WAMPP and the like provide you with a local, private, test web server so you can do this. I use usbwebserver as it doesn't need to be installed and is totally portable on a usb stick, just unzip the files to a folder and it works, and you can make several folders each with a copy in it if you wish to work on separate projects, although you can work with a single copy just as easily. It's the ideal way to develop and test a databse driven web site - get it working at home, then upload to the real server. You are not adding "more junk" as you erroneously call it, you are adding the required server software. You wouldn't expect a program you downloaded to run without an operating system on your computer, would your?

IF you just want to play with PHP you don't need to use MySQL, but just playing with php will not help you much. PHP is used mainly to communicate with the web database and process the contents. Or run includes. But PHP still needs to run through a web server.

It sounds as if you are trying to run MySQL as a standalone program, in which case you are forced to use the command line. But on web servers, you need php to talk to the database.

Usbwebserver and the like are self contained packages with everything there ready to work, the MySQL and PHP included.
Some people use MySQL from the command line as a practice environment to prepare for using Oracle at the command line.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.