Page 1 of 1

Error with MySQL

Posted: Thu Aug 22, 2002 5:27 am
by Hello PHP
Hello I'm very new to PHP and MySQL.
I got first error with MYSQL when I tried to connected thought command prompt.
"ERROR 2003 : Can't connect to MySQL server on 'localhost' <10061>
After I run C:\mysql\bin\mysql in Command Prompt.
I running WinXP.
What I done wrong please help me :(
(sorry for mess up in other topic)

Posted: Thu Aug 22, 2002 6:51 am
by Hello PHP
I don't know what's happend.
but seem that problem was gone.
but I got a new one.
mysql>CREATE TABLE tbl_gallery (
->iID INT(11) NOT NULL AUTO_INCREMENT,
->PRIMARY KEY (iID)
->);
ERROR 1046 : NO Database Selected
What I done wrong ? :?

Posted: Thu Aug 22, 2002 7:46 am
by mikeq
You have to tell mysql which database to use, either when you login or once logged in.

When logging in at the command line

mysql -uUserName -pMyPassword db_name

or once logged in at the prompt

mysql>USE db_name

Posted: Thu Aug 22, 2002 8:43 am
by Hello PHP
Thank you so much :D
I feel so ashamed for my stupid :oops:

Posted: Fri Aug 23, 2002 4:48 am
by mikeq
Hey, we all have to learn these things at some point. :)