PHP5, MySQL5, Apache2 Startup Problem: Host "localhost" is not allowed to connect to this MySQL serv
PHP5, MySQL5, Apache2 Startup Problem: Host "localhost" is not allowed to connect to this MySQL serv
am 10.11.2005 09:37:32 von SteadyEddie
Ok. ive had a setup running mysql before using an install program to learn
php n mysql. I am now trying to setup the server for myself without
phpmyadmin ect.
Im using apache 2, mysql 5 and php. I understand that the binaries for mysql
were not included in php5 so ive downloaded then and have the dlls in the
php/ext folder with the correct info in the php.ini file.
My apache2 folder is available to the windows PATH as so is the mysql/bin
and mysql/ folder.
MySql client wont let me log in. and when i try to do it with PHP i get the
following error:
Attempting Connection:
Host: localhost User: root + password
Warning: mysql_connect() [function.mysql-connect]: Host 'localhost' is not
allowed to connect to this MySQL server in C:\ApacheServer\WebRoot\index.php
on line 25
I have seen some articles that say mysql commands no longer work with some
versions and you need to use mysqli.
this is the result i found when using mysqli:
Attempting Connection:
Host: localhost User: root
Fatal error: Call to undefined function mysqli_connect() in
C:\ApacheServer\WebRoot\index.php on line 32
Someone please help me?????????????????????????????????????????????????????
Ill post my folder structure just incase it help:
c:/Apache Server/
| - Apache2
| - MySql
| - PHP
| - WebRoot
Re: PHP5, MySQL5, Apache2 Startup Problem: Host "localhost" is notallowed to connect to this MySQL s
am 10.11.2005 11:59:56 von Shion
SteadyEddie wrote:
>
> Ok. ive had a setup running mysql before using an install program to learn
> php n mysql. I am now trying to setup the server for myself without
> phpmyadmin ect.
>
> Im using apache 2, mysql 5 and php. I understand that the binaries for mysql
> were not included in php5 so ive downloaded then and have the dlls in the
> php/ext folder with the correct info in the php.ini file.
>
> My apache2 folder is available to the windows PATH as so is the mysql/bin
> and mysql/ folder.
>
> MySql client wont let me log in. and when i try to do it with PHP i get the
> following error:
>
> Attempting Connection:
> Host: localhost User: root + password
> Warning: mysql_connect() [function.mysql-connect]: Host 'localhost' is not
> allowed to connect to this MySQL server in C:\ApacheServer\WebRoot\index.php
> on line 25
This is a "mysql problem" and not PHP, the user "root" aren't allowed to
connect from the same machine as the mysql is running on, you need to alter
the permissions for the user "root", so that it can be logged from localhost
http://dev.mysql.com/doc/refman/5.0/en/create-user.html
http://dev.mysql.com/doc/refman/5.0/en/grant.html
> Attempting Connection:
> Host: localhost User: root
> Fatal error: Call to undefined function mysqli_connect() in
> C:\ApacheServer\WebRoot\index.php on line 32
The PHP you are using is compiled without the mysqli support.
//Aho
Re: PHP5, MySQL5, Apache2 Startup Problem: Host "localhost" is not allowed to connect to this MySQL
am 11.11.2005 10:48:43 von SteadyEddie
How do I Grant the permissions? It wont let me log in to change them???
"J.O. Aho" wrote in message
news:3tgnhdFst1aoU1@individual.net...
> SteadyEddie wrote:
> >
> > Ok. ive had a setup running mysql before using an install program to
learn
> > php n mysql. I am now trying to setup the server for myself without
> > phpmyadmin ect.
> >
> > Im using apache 2, mysql 5 and php. I understand that the binaries for
mysql
> > were not included in php5 so ive downloaded then and have the dlls in
the
> > php/ext folder with the correct info in the php.ini file.
> >
> > My apache2 folder is available to the windows PATH as so is the
mysql/bin
> > and mysql/ folder.
> >
> > MySql client wont let me log in. and when i try to do it with PHP i get
the
> > following error:
> >
> > Attempting Connection:
> > Host: localhost User: root + password
> > Warning: mysql_connect() [function.mysql-connect]: Host 'localhost' is
not
> > allowed to connect to this MySQL server in
C:\ApacheServer\WebRoot\index.php
> > on line 25
>
> This is a "mysql problem" and not PHP, the user "root" aren't allowed to
> connect from the same machine as the mysql is running on, you need to
alter
> the permissions for the user "root", so that it can be logged from
localhost
>
> http://dev.mysql.com/doc/refman/5.0/en/create-user.html
> http://dev.mysql.com/doc/refman/5.0/en/grant.html
>
>
> > Attempting Connection:
> > Host: localhost User: root
> > Fatal error: Call to undefined function mysqli_connect() in
> > C:\ApacheServer\WebRoot\index.php on line 32
>
> The PHP you are using is compiled without the mysqli support.
>
>
>
> file://Aho
>
Re: PHP5, MySQL5, Apache2 Startup Problem: Host "localhost" is not allowed to connect to this MySQL
am 13.11.2005 08:35:16 von Shawn
try login as root without password.
mysql -u root -p
when prompted for password just hit enter.
"SteadyEddie" wrote in message
news:%NZcf.13233$Ua6.3609@newsfe6-win.ntli.net...
>
> How do I Grant the permissions? It wont let me log in to change them???
>
>
>
> "J.O. Aho" wrote in message
> news:3tgnhdFst1aoU1@individual.net...
>> SteadyEddie wrote:
>> >
>> > Ok. ive had a setup running mysql before using an install program to
> learn
>> > php n mysql. I am now trying to setup the server for myself without
>> > phpmyadmin ect.
>> >
>> > Im using apache 2, mysql 5 and php. I understand that the binaries for
> mysql
>> > were not included in php5 so ive downloaded then and have the dlls in
> the
>> > php/ext folder with the correct info in the php.ini file.
>> >
>> > My apache2 folder is available to the windows PATH as so is the
> mysql/bin
>> > and mysql/ folder.
>> >
>> > MySql client wont let me log in. and when i try to do it with PHP i get
> the
>> > following error:
>> >
>> > Attempting Connection:
>> > Host: localhost User: root + password
>> > Warning: mysql_connect() [function.mysql-connect]: Host 'localhost' is
> not
>> > allowed to connect to this MySQL server in
> C:\ApacheServer\WebRoot\index.php
>> > on line 25
>>
>> This is a "mysql problem" and not PHP, the user "root" aren't allowed to
>> connect from the same machine as the mysql is running on, you need to
> alter
>> the permissions for the user "root", so that it can be logged from
> localhost
>>
>> http://dev.mysql.com/doc/refman/5.0/en/create-user.html
>> http://dev.mysql.com/doc/refman/5.0/en/grant.html
>>
>>
>> > Attempting Connection:
>> > Host: localhost User: root
>> > Fatal error: Call to undefined function mysqli_connect() in
>> > C:\ApacheServer\WebRoot\index.php on line 32
>>
>> The PHP you are using is compiled without the mysqli support.
>>
>>
>>
>> file://Aho
>>
>
>
>