Jump to content
xisto Community
JeremyShaw

Mysql Connect

Recommended Posts

Okay, MySQL was installed, as per the guide on php.net, and all of the config done. This was done on a Windows computer with IIS 5 on XP. The comand line will not let me login! The program groups' own shortcut doesn't work! Will any one help?

Share this post


Link to post
Share on other sites

Eerm maybe you can use php to edit it? That'll take hours longer than phpMYadmin...but if you have to make a php script start with...

<?phpmysql_connect("localhost", "<user>", "<pass>") or die(mysql_error());mysql_select_db("db") or die(mysql_error())

I am not trying to sound mean...however your post makes me want to cry...I can feel your desperation.
Edited by SilverFox (see edit history)

Share this post


Link to post
Share on other sites

OK, clearly you have a configuration problem, probably the mysql database did not start, or the user does not exist yet.If you want to simply train yourselv, may I suggest an easier way ?I would suggest you to install easyphp. It comes with everything bundled inside (php, mysql, the web server), the install is straightforward (nothing to do) and when you ask it, everything starts automatically and is ready to be used. When you will have learned how to use easyphp, you will be able to switch to some more complicated (because not bundled nor packaged) environments.RegardsYordan

Share this post


Link to post
Share on other sites

OK, clearly you have a configuration problem, probably the mysql database did not start, or the user does not exist yet.If you want to simply train yourselv, may I suggest an easier way ?
I would suggest you to install easyphp. It comes with everything bundled inside (php, mysql, the web server), the install is straightforward (nothing to do) and when you ask it, everything starts automatically and is ready to be used.
When you will have learned how to use easyphp, you will be able to switch to some more complicated (because not bundled nor packaged) environments.
Regards
Yordan

Thank you, I was looking around and also found a similar package, wamp5 server.

Share this post


Link to post
Share on other sites

I suggest you get phpMyAdmin.

Not so simple. I had this problem some monthes ago : phpmyadmin needs you to be connected. So, if you cannot connect to the database, phpmyadmin will not allow you to examine the database.

Share this post


Link to post
Share on other sites

Okay, MySQL was installed, as per the guide on php.net, and all of the config done. This was done on a Windows computer with IIS 5 on XP. The comand line will not let me login! The program groups' own shortcut doesn't work! Will any one help?

May be you can't login because the server isn't started yet. You must start the mysql server before you can do anything on it, so, to start it you can use a command line, a batch file, the services console or even the run command:

With the Run command: Click on the Start menu, then select Run... and type net start mysql and press enter in the opened dialog.

With a batch file: Create a new batch file with any text editor, name it filename.bat, and inside it type the following:

@echo off

cls

net start mysql

exit

Using the services management console: Simply press the start button located on the toolbar or right click the mysql service and select start.

Using a command shell: simply type net start mysql on the opened window.

After your server is started you can login to it by using a shell window, type the next command on it and press enter:

 

>mysql -uuser -ppwd

 

replace user with your user name -maybe root- and pwd with its password.

 

Best regards,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.