Re: MySQL database
| From: | \[Inf\] F!RE-WALL | Date: | Wed, 16 May 2001 13:25:02 +0000 |
| Subject: | Re: MySQL database | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53032@lists.php.net to get a copy of this message | ||
Erm......I'm using windows.....
And euh....I have MySQL installed, but I don't know if it's running. Anyway,
the phpinfo() returns that "MySQL" is enabled.....so I guess it must be
working.....
""Julia A. Case"" <julie@MageNet.com> wrote in message
news:20010516050336.A23307@MageNet.com...
> first off, is the MySQL database running? you can do a ps -xa | grep
> mysql to see... second you need to enter a username and password on the
> mysql_connect line..
>
> Hope this helps,
> Julia
>
> Quoting [Inf] F!RE-WALL (claninfinity@icqmail.com):
> > Yo,
> >
> > I'd like to use a MySQL database on my website. If I look at the PHP
details
> > of my site (see for yourself at
http://infinity.shrimpwars.be/phpinfo.php)
> > it says under the MySQL section: "enabled". Well, if I create a testpage
> > with this as content:
> >
> > <?
> > mysql_connect("localhost", "", "")
> > or die ("unable to connect to database");
> > ?>
> >
> > I get this:
> >
> > Warning: MySQL Connection Failed: Can't connect to local MySQL server
> > through socket '/var/lib/mysql/mysql.sock' (111) in
> > /clans/infinity/mysql.php on line 2
> > unable to connect to database
> >
> > If I run the script on my local machine I get this:
> >
> > Warning: MySQL Connection Failed: Can't connect to MySQL server on
> > 'localhost' (10061) in e:\webserver\phptest\mysql.php on line 2
> > unable to connect to database
> >
> >
> > What is wrong? Do note that I don't know much about MySQL, I'm still
> > learning :-P
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> [ Julia Anne Case ] [ Ships are safe inside the harbor, ]
> [Programmer at large] [ but is that what ships are really for. ]
> [ Admining Linux ] [ To thine own self be true. ]
> [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>